summaryrefslogtreecommitdiffstats
path: root/Http/RememberMe/TokenBasedRememberMeServices.php
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-05-22 16:53:08 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-05-22 16:53:08 +0200
commitc1c3818ea43fa8149223a4b55d694327d226e27b (patch)
treeb9d8678ae56482bcfaba16cc3c30c4e2bc064ec9 /Http/RememberMe/TokenBasedRememberMeServices.php
parentc7f7fcfa6dbcd0ae71be8fb4b2c0dbbce8f38150 (diff)
parentb3d032613d74a7d5d7babeee28d9ac8f870ff36c (diff)
downloadsymfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.zip
symfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.tar.gz
symfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.tar.bz2
Merge branch '2.3' into 2.6v2.6.9v2.6.8
* 2.3: Fix typo Check instance of FormBuilderInterface instead of FormBuilder [Security] TokenBasedRememberMeServices test to show why encoding username is required [Security] AbstractRememberMeServices::encodeCookie() validates cookie parts [console][formater] allow format toString object. [HttpFoundation] Fix baseUrl when script filename is contained in pathInfo Avoid redirection to XHR URIs [HttpFoundation] IpUtils::checkIp4() should allow networks Fix HTML escaping of to-source links [FrameworkBundle] Removed unnecessary parameter in TemplateController [DomCrawler] Throw an exception if a form field path is incomplete. [Console] Delete duplicate test in CommandTest [TwigBundle] Refresh twig paths when resources change. WebProfiler break words fixed typo Update README.md [HttpKernel] Handle an array vary header in the http cache store [Security][Translation] fixes #14584 [Framework] added test for Router commands. Handled bearer authorization header in REDIRECT_ form Conflicts: src/Symfony/Component/Debug/ExceptionHandler.php
Diffstat (limited to 'Http/RememberMe/TokenBasedRememberMeServices.php')
-rw-r--r--Http/RememberMe/TokenBasedRememberMeServices.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php
index 3fe39ac..65bac0a 100644
--- a/Http/RememberMe/TokenBasedRememberMeServices.php
+++ b/Http/RememberMe/TokenBasedRememberMeServices.php
@@ -95,12 +95,12 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
* @param int $expires The Unix timestamp when the cookie expires
* @param string $password The encoded password
*
- * @throws \RuntimeException if username contains invalid chars
- *
* @return string
*/
protected function generateCookieValue($class, $username, $expires, $password)
{
+ // $username is encoded because it might contain COOKIE_DELIMITER,
+ // we assume other values don't
return $this->encodeCookie(array(
$class,
base64_encode($username),
@@ -117,8 +117,6 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices
* @param int $expires The Unix timestamp when the cookie expires
* @param string $password The encoded password
*
- * @throws \RuntimeException when the private key is empty
- *
* @return string
*/
protected function generateCookieHash($class, $username, $expires, $password)