mirror of
https://github.com/snipe/snipe-it.git
synced 2025-10-30 03:42:35 +00:00
One last time
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
2f093c0e82
commit
e4f06b0ca8
@ -392,7 +392,14 @@ class LdapTroubleshooter extends Command
|
|||||||
$this->debugout("LDAP constants are: ".print_r($ldap_constants,true));
|
$this->debugout("LDAP constants are: ".print_r($ldap_constants,true));
|
||||||
|
|
||||||
foreach($ldap_urls AS $ldap_url) {
|
foreach($ldap_urls AS $ldap_url) {
|
||||||
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,Crypt::decrypt($settings->ldap_pword),$settings)) {
|
try {
|
||||||
|
$w = Crypt::Decrypt($settings->ldap_pword);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,$w,$settings)) {
|
||||||
$this->info("Success getting informational bind!");
|
$this->info("Success getting informational bind!");
|
||||||
} else {
|
} else {
|
||||||
$this->error("Unable to get information from bind.");
|
$this->error("Unable to get information from bind.");
|
||||||
@ -615,4 +622,6 @@ class LdapTroubleshooter extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user