-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Add SameSite parameter to cookie setting functions #10317
base: master
Are you sure you want to change the base?
Conversation
233c984
to
a9120e8
Compare
|
||
/* Verify that cookie is secure if using SameSite::None, see | ||
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite#samesitenone_requires_secure */ | ||
if (!secure && zend_string_equals_literal(samesite, "None")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this passes, this would be the second native enum. Leaving this link here for reference: #9679 (comment)
@@ -85,7 +85,7 @@ function session_cache_limiter(?string $value = null): string|false {} | |||
|
|||
function session_cache_expire(?int $value = null): int|false {} | |||
|
|||
function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null): bool {} | |||
function session_set_cookie_params(array|int $lifetime_or_options, ?string $path = null, ?string $domain = null, ?bool $secure = null, ?bool $httponly = null, SameSite $sameSite = SameSite::Lax): bool {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just general feeling impression, the camel case feels out of place whereas is mostly lower case with underscore otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
RFC: https://wiki.php.net/rfc/same-site-parameter