Fixed a regex syntax error on line 34 (#78)

Co-authored-by: root <root@sso.us-central1-a.c.pmg-internal.internal>
This commit is contained in:
Justin B 2021-03-15 02:30:56 -07:00 committed by GitHub
parent 5acc835be9
commit 2b550b1819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ function open_ldap_connection($ldap_bind=TRUE) {
exit(0);
}
else {
if ($SENT_HEADERS == TRUE and !preg_match('/^ldap:\/\/localhost(:[0-9]+)?$', $LDAP['uri']) and !preg_match('/^ldap:\/\/127\.0\.0\.([0-9]+)(:[0-9]+)$', $LDAP['uri'])) {
if ($SENT_HEADERS == TRUE and !preg_match('/^ldap:\/\/localhost(:[0-9]+)?$/', $LDAP['uri']) and !preg_match('/^ldap:\/\/127\.0\.0\.([0-9]+)(:[0-9]+)$/', $LDAP['uri'])) {
print "<div style='position: fixed;bottom: 0px;width: 100%;height: 20px;border-bottom:solid 20px yellow;'>WARNING: Insecure LDAP connection to ${LDAP['uri']}</div>";
}
ldap_close($ldap_connection);