Skip to content
Snippets Groups Projects
Commit b5eb7932 authored by Hans Zandbelt's avatar Hans Zandbelt
Browse files

handle empty password as error (prevent some LDAP implementations to handle it as anonymous bind)

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1062 44740490-163a-0410-bde0-09ae8108e29a
parent e3fbe58a
No related branches found
No related tags found
Loading
......@@ -96,7 +96,7 @@ if (isset($_POST['username'])) {
/*
* Do LDAP bind using DN.
*/
if (!$ldap->bind($dn, $password)) {
if (($pwd == "") or (!$ldap->bind($dn, $pwd))) {
SimpleSAML_Logger::info('AUTH - ldap: '. $username . ' failed to authenticate. DN=' . $dn);
throw new Exception('error_wrongpassword');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment