Skip to content
Snippets Groups Projects
Commit ea04a6ea authored by Mads Freek Petersen's avatar Mads Freek Petersen
Browse files

Always bind with priv_user_dn if configured in validate as per Miguel Cabeça's patch.

Otherwise using validate for getting attributes (not authenticate eg. from cas)
would only bind with priv_user_dn when also searching for the dn was configured.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@976 44740490-163a-0410-bde0-09ae8108e29a
parent 5e6e4905
No related branches found
No related tags found
No related merge requests found
......@@ -186,12 +186,12 @@ class SimpleSAML_Auth_LDAP {
$username = addcslashes($username, ',+"\\<>;*');
$password = addcslashes($password, ',+"\\<>;*');
if (isset($config['priv_user_dn']) && !$this->bind($config['priv_user_dn'], $config['priv_user_pw']) ) {
throw new Exception('Could not bind with system user: ' . $config['priv_user_dn']);
}
if (isset($config['dnpattern'])) {
$dn = str_replace('%username%', $username, $config['dnpattern']);
} else {
if (isset($config['priv_user_dn']) && !$this->bind($config['priv_user_dn'], $config['priv_user_pw']) ) {
throw new Exception('Could not bind with system user: ' . $config['priv_user_dn']);
}
$dn = $this->searchfordn($config['searchbase'], $config['searchattributes'], $username);
}
......
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