mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed auth_test script does not do ldap bind (#10865)
This commit is contained in:
5
scripts/auth_test.php
Executable file → Normal file
5
scripts/auth_test.php
Executable file → Normal file
@@ -45,6 +45,11 @@ if (Config::get('auth_mechanism') == 'ldap' || Config::get('auth_mechanism') ==
|
||||
try {
|
||||
$authorizer = LegacyAuth::get();
|
||||
|
||||
// ldap based auth we should bind before using, otherwise searches may fail due to anonymous bind
|
||||
if (method_exists($authorizer, 'bind')) {
|
||||
$authorizer->bind([]);
|
||||
}
|
||||
|
||||
// AD bind tests
|
||||
if ($authorizer instanceof \LibreNMS\Authentication\ActiveDirectoryAuthorizer) {
|
||||
// peek inside the class
|
||||
|
Reference in New Issue
Block a user