Skip to content

Commit 6cc377f

Browse files
committed
bug symfony#35343 [Security] Fix RememberMe with null password (jderusse)
This PR was merged into the 3.4 branch. Discussion ---------- [Security] Fix RememberMe with null password | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | yes | Tickets | NA | License | MIT | Doc PR | NA From `UserInterface` the method getPassword may return null, while generateCookieHash requires a string. This PR changes the signature of the methods to allows null password Similar to symfony#35335 for branch 3.4 Commits ------- 820eb35 Fix RememberMe with null password
2 parents db3134e + 820eb35 commit 6cc377f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ protected function onLoginSuccess(Request $request, Response $response, TokenInt
8989
/**
9090
* Generates the cookie value.
9191
*
92-
* @param string $class
93-
* @param string $username The username
94-
* @param int $expires The Unix timestamp when the cookie expires
95-
* @param string $password The encoded password
92+
* @param string $class
93+
* @param string $username The username
94+
* @param int $expires The Unix timestamp when the cookie expires
95+
* @param string|null $password The encoded password
9696
*
9797
* @return string
9898
*/
@@ -111,10 +111,10 @@ protected function generateCookieValue($class, $username, $expires, $password)
111111
/**
112112
* Generates a hash for the cookie to ensure it is not being tampered with.
113113
*
114-
* @param string $class
115-
* @param string $username The username
116-
* @param int $expires The Unix timestamp when the cookie expires
117-
* @param string $password The encoded password
114+
* @param string $class
115+
* @param string $username The username
116+
* @param int $expires The Unix timestamp when the cookie expires
117+
* @param string|null $password The encoded password
118118
*
119119
* @return string
120120
*/

0 commit comments

Comments
 (0)