diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-07-22 12:08:40 +0200 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-07-22 12:08:40 +0200 |
commit | 7ab68c8fe7a6bedf4f6302c027e96d9da47b6bd0 (patch) | |
tree | d62e8a8e7c6483a67cba0b36f6266dc24d70d691 /Core/Authentication | |
parent | bc07ab0b812567146980e40ab3987aa46a3f95a1 (diff) | |
parent | 9aab3966fdabe3d6085ce5b1637503b74a7a5ce0 (diff) | |
download | symfony-security-7ab68c8fe7a6bedf4f6302c027e96d9da47b6bd0.zip symfony-security-7ab68c8fe7a6bedf4f6302c027e96d9da47b6bd0.tar.gz symfony-security-7ab68c8fe7a6bedf4f6302c027e96d9da47b6bd0.tar.bz2 |
Merge branch '2.3' into 2.6
* 2.3:
[Security] fix check for empty usernames
[Form] updated exception message of ButtonBuilder::setRequestHandler()
[travis] Fix deps=high jobs
[HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
[DependencyInjection] Remove unused code in XmlFileLoader
[HttpFoundation] Behaviour change in PHP7 for substr
bumped Symfony version to 2.3.32
updated VERSION for 2.3.31
update CONTRIBUTORS for 2.3.31
updated CHANGELOG for 2.3.31
Conflicts:
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/HttpKernel/Kernel.php
Diffstat (limited to 'Core/Authentication')
-rw-r--r-- | Core/Authentication/Provider/UserAuthenticationProvider.php | 2 | ||||
-rw-r--r-- | Core/Authentication/RememberMe/PersistentToken.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Core/Authentication/Provider/UserAuthenticationProvider.php b/Core/Authentication/Provider/UserAuthenticationProvider.php index ded53e4..2674088 100644 --- a/Core/Authentication/Provider/UserAuthenticationProvider.php +++ b/Core/Authentication/Provider/UserAuthenticationProvider.php @@ -62,7 +62,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter } $username = $token->getUsername(); - if (empty($username)) { + if ('' === $username || null === $username) { $username = 'NONE_PROVIDED'; } diff --git a/Core/Authentication/RememberMe/PersistentToken.php b/Core/Authentication/RememberMe/PersistentToken.php index 92fcb4f..d85572d 100644 --- a/Core/Authentication/RememberMe/PersistentToken.php +++ b/Core/Authentication/RememberMe/PersistentToken.php @@ -40,7 +40,7 @@ final class PersistentToken implements PersistentTokenInterface if (empty($class)) { throw new \InvalidArgumentException('$class must not be empty.'); } - if (empty($username)) { + if ('' === $username || null === $username) { throw new \InvalidArgumentException('$username must not be empty.'); } if (empty($series)) { |