diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-05-22 16:53:08 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-05-22 16:53:08 +0200 |
commit | c1c3818ea43fa8149223a4b55d694327d226e27b (patch) | |
tree | b9d8678ae56482bcfaba16cc3c30c4e2bc064ec9 /Http/RememberMe/AbstractRememberMeServices.php | |
parent | c7f7fcfa6dbcd0ae71be8fb4b2c0dbbce8f38150 (diff) | |
parent | b3d032613d74a7d5d7babeee28d9ac8f870ff36c (diff) | |
download | symfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.zip symfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.tar.gz symfony-security-c1c3818ea43fa8149223a4b55d694327d226e27b.tar.bz2 |
* 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/AbstractRememberMeServices.php')
-rw-r--r-- | Http/RememberMe/AbstractRememberMeServices.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php index b14e36d..16f7831 100644 --- a/Http/RememberMe/AbstractRememberMeServices.php +++ b/Http/RememberMe/AbstractRememberMeServices.php @@ -268,9 +268,17 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface * @param array $cookieParts * * @return string + * + * @throws \InvalidArgumentException When $cookieParts contain the cookie delimiter. Extending class should either remove or escape it. */ protected function encodeCookie(array $cookieParts) { + foreach ($cookieParts as $cookiePart) { + if (false !== strpos($cookiePart, self::COOKIE_DELIMITER)) { + throw new \InvalidArgumentException(sprintf('$cookieParts should not contain the cookie delimiter "%s"', self::COOKIE_DELIMITER)); + } + } + return base64_encode(implode(self::COOKIE_DELIMITER, $cookieParts)); } |