Skip to content

Commit dcf596a

Browse files
Merge branch '3.4' into 4.4
* 3.4: [Http Foundation] Fix clear cookie samesite [Security] Check if firewall is stateless before checking for session/previous session [Form] Support customized intl php.ini settings [Security] Remember me: allow to set the samesite cookie flag [Debug] fix for PHP 7.3.16+/7.4.4+ [Validator] Backport translations Prevent warning in proc_open()
2 parents 4f613fd + d964f00 commit dcf596a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

RememberMe/AbstractRememberMeServices.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
3939
protected $options = [
4040
'secure' => false,
4141
'httponly' => true,
42+
'samesite' => null,
4243
];
4344
private $providerKey;
4445
private $secret;
@@ -276,7 +277,7 @@ protected function cancelCookie(Request $request)
276277
$this->logger->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]);
277278
}
278279

279-
$request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'] ?? $request->isSecure(), $this->options['httponly'], false, $this->options['samesite'] ?? null));
280+
$request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'] ?? $request->isSecure(), $this->options['httponly'], false, $this->options['samesite']));
280281
}
281282

282283
/**

RememberMe/PersistentTokenBasedRememberMeServices.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function processAutoLoginCookie(array $cookieParts, Request $request)
8686
$this->options['secure'] ?? $request->isSecure(),
8787
$this->options['httponly'],
8888
false,
89-
$this->options['samesite'] ?? null
89+
$this->options['samesite']
9090
)
9191
);
9292

@@ -121,7 +121,7 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
121121
$this->options['secure'] ?? $request->isSecure(),
122122
$this->options['httponly'],
123123
false,
124-
$this->options['samesite'] ?? null
124+
$this->options['samesite']
125125
)
126126
);
127127
}

RememberMe/TokenBasedRememberMeServices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
8383
$this->options['secure'] ?? $request->isSecure(),
8484
$this->options['httponly'],
8585
false,
86-
$this->options['samesite'] ?? null
86+
$this->options['samesite']
8787
)
8888
);
8989
}

0 commit comments

Comments
 (0)