Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6cc377f

Browse filesBrowse files
committed
bug #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 #35335 for branch 3.4 Commits ------- 820eb35 Fix RememberMe with null password
2 parents db3134e + 820eb35 commit 6cc377f
Copy full SHA for 6cc377f

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/RememberMe/TokenBasedRememberMeServices.php
+8-8Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.