summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorVictor Berchet <victor@suumit.com>2012-06-20 20:42:55 +0200
committerVictor Berchet <victor@suumit.com>2012-06-20 20:42:55 +0200
commit0c3f1b8f2335a0801b1078e7401216da731a0996 (patch)
treef0ea5c89f5a20eb2a73e413f193d816458eb5d1b /Core/Authentication
parented6dd939533f929a14c629a91770879c00997600 (diff)
downloadsymfony-security-0c3f1b8f2335a0801b1078e7401216da731a0996.zip
symfony-security-0c3f1b8f2335a0801b1078e7401216da731a0996.tar.gz
symfony-security-0c3f1b8f2335a0801b1078e7401216da731a0996.tar.bz2
[Security] Allow "0" as a password
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/Provider/DaoAuthenticationProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Core/Authentication/Provider/DaoAuthenticationProvider.php b/Core/Authentication/Provider/DaoAuthenticationProvider.php
index f17eaa4..f22045f 100644
--- a/Core/Authentication/Provider/DaoAuthenticationProvider.php
+++ b/Core/Authentication/Provider/DaoAuthenticationProvider.php
@@ -59,7 +59,7 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
throw new BadCredentialsException('The credentials were changed from another session.');
}
} else {
- if (!$presentedPassword = $token->getCredentials()) {
+ if ("" === ($presentedPassword = $token->getCredentials())) {
throw new BadCredentialsException('The presented password cannot be empty.');
}