summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-07-22 13:24:41 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-07-22 13:24:41 +0200
commit185507f0f15e07f162d047306f018fd55cdf5d3c (patch)
treea1e2df8849ef8fcc874982fbe99f6655a8aa8d0c /Core/Authentication
parentb57956299e1d75663d748645564d76efcb9e72f3 (diff)
parent3570d0fe102983c1b7c631e148e1b477f31e1a7f (diff)
downloadsymfony-security-185507f0f15e07f162d047306f018fd55cdf5d3c.zip
symfony-security-185507f0f15e07f162d047306f018fd55cdf5d3c.tar.gz
symfony-security-185507f0f15e07f162d047306f018fd55cdf5d3c.tar.bz2
Merge branch '2.7' into 2.8
* 2.7: [HttpKernel] Fix lowest dep [Security] fix check for empty usernames [Form] updated exception message of ButtonBuilder::setRequestHandler() [travis] Fix deps=high jobs Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7 [Serializer] Simplify AbstractNormalizer::prepareForDenormalization() [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/HttpKernel/composer.json
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/Provider/UserAuthenticationProvider.php2
-rw-r--r--Core/Authentication/RememberMe/PersistentToken.php2
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)) {