소스 검색

Error with query construction, missing "( )"

error when the user search string in auth.conf.php

adding the extra "( )" englobes the full query and renders it correct as a LDAP filter.
StarbugStone 8 년 전
부모
커밋
81a4c73484
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      main/auth/ldap/authldap.php

+ 1 - 1
main/auth/ldap/authldap.php

@@ -387,7 +387,7 @@ function ldap_get_users() {
         }
         }
         $str_query.=" )";
         $str_query.=" )";
     } else {
     } else {
-        $str_query= count($ldap_query) > 0 ? $ldap_query[0] : null;
+        $str_query= count($ldap_query) > 0 ? "(".$ldap_query[0].")" : null;
     }
     }
 
 
     $ds = ldap_connect($ldap_host, $ldap_port);
     $ds = ldap_connect($ldap_host, $ldap_port);