diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2016-05-12 10:59:27 -0500 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2016-05-12 10:59:27 -0500 |
commit | ef9abbe2063b55156fb88c353b4e332eef0793fc (patch) | |
tree | 50460e40705b01ba4751038e69acbad9074e8087 /Core/Authentication/Provider/LdapBindAuthenticationProvider.php | |
parent | cc9e95904aafbb46d8e5133049078ba099f9c4e1 (diff) | |
parent | 787f7af77f69aa72028a3865f3689a6f18995c96 (diff) | |
download | symfony-security-ef9abbe2063b55156fb88c353b4e332eef0793fc.zip symfony-security-ef9abbe2063b55156fb88c353b4e332eef0793fc.tar.gz symfony-security-ef9abbe2063b55156fb88c353b4e332eef0793fc.tar.bz2 |
Merge branch '3.0'v3.1.0-BETA1
* 3.0: (31 commits)
Drop hirak/prestissimo
[MonologBridge] Uninstallable together with symfony/http-kernel in 3.0.6
bumped Symfony version to 3.0.7
updated VERSION for 3.0.6
updated CHANGELOG for 3.0.6
bumped Symfony version to 2.8.7
updated VERSION for 2.8.6
updated CHANGELOG for 2.8.6
bumped Symfony version to 2.7.14
updated VERSION for 2.7.13
updated CHANGELOG for 2.7.13
bumped Symfony version to 2.3.42
[Debug] Fix fatal error handlers on PHP 7
updated VERSION for 2.3.41
update CONTRIBUTORS for 2.3.41
updated CHANGELOG for 2.3.41
fixed bad merge
Fixed issue with blank password with Ldap
limited the maximum length of a submitted username
[2.3][Component/Security] Fixed phpdoc in AnonymousToken constructor for user param
...
Conflicts:
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php
src/Symfony/Component/HttpKernel/Kernel.php
Diffstat (limited to 'Core/Authentication/Provider/LdapBindAuthenticationProvider.php')
-rw-r--r-- | Core/Authentication/Provider/LdapBindAuthenticationProvider.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php index 950b603..5ebb09a 100644 --- a/Core/Authentication/Provider/LdapBindAuthenticationProvider.php +++ b/Core/Authentication/Provider/LdapBindAuthenticationProvider.php @@ -73,6 +73,10 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider $username = $token->getUsername(); $password = $token->getCredentials(); + if ('' === $password) { + throw new BadCredentialsException('The presented password must not be empty.'); + } + try { $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_DN); $dn = str_replace('{username}', $username, $this->dnString); |