SameSite=None cookie (ARCH7136)
Esta página aún no está disponible en tu idioma.
Key php.security.samesite-none-cookie · Severity warning · Category security · CWE CWE-1275
Cookies set with SameSite=None but without Secure are rejected by modern browsers and weaken CSRF posture. If SameSite=None is used, the cookie must also be Secure.
Incorrect
Section titled “Incorrect”<?phpsetcookie('session', $id, [ 'samesite' => 'None', 'httponly' => true,]);Correct
Section titled “Correct”<?phpsetcookie('session', $id, [ 'samesite' => 'Lax', 'secure' => true, 'httponly' => true,]);Prefer SameSite=Lax; if None is required, add the Secure attribute to the cookie.