You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate SameSite cookie attribute against allowed values (#21670)
Extract php_is_valid_samesite_value() in ext/standard/head.c as a
shared validation function that enforces the SameSite whitelist
(Strict, Lax, None, or empty string) with case-insensitive matching.
Apply validation in both setcookie()/setrawcookie() (replacing the
existing TODO comment) and the session.cookie_samesite INI handler.
Previously arbitrary strings including CRLF sequences were accepted
and appended verbatim into the Set-Cookie header.
Warning: session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active (started from %s on line %d) in %s on line %d
51
+
Warning: session_set_cookie_params(): session.cookie_samesite must be "Strict", "Lax", "None", or "" in %s on line %d
52
+
bool(false)
53
+
string(0) ""
54
+
-- Invalid value via ini_set --
55
+
56
+
Warning: ini_set(): session.cookie_samesite must be "Strict", "Lax", "None", or "" in %s on line %d
40
57
bool(false)
41
-
string(7) "nothing"
58
+
string(0) ""
59
+
-- Cannot change while session is active --
42
60
bool(true)
43
-
string(7) "nothing"
44
61
bool(true)
45
-
string(5) "other"
62
+
63
+
Warning: session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active (started from %s on line %d) in %s on line %d
0 commit comments