From 7ed5077c018df32a93c8885f29c51b0f00eccfc3 Mon Sep 17 00:00:00 2001 From: Kike Date: Sat, 23 Jun 2018 14:24:32 +0200 Subject: [PATCH] Added regex to LDAP advanced permissions --- pandora_console/include/auth/mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 705c600943..f2aff5ed44 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -349,7 +349,7 @@ function process_user_login_remote ($login, $pass, $api = false) { foreach ($attributes as $attr) { $attr = explode('=', $attr, 2); - if(in_array($attr[1],$sr[$attr[0]])) { + if(preg_match('/' . $attr[1] . '/', $sr[$attr[0]][0])){ $permissions[$i]["profile"] = $ldap_adv_perm['profile']; $permissions[$i]["groups"] = $ldap_adv_perm['group']; $permissions[$i]["tags"] = implode(",",$ldap_adv_perm['tags']);