Skip to content
Snippets Groups Projects
Commit 266e5c75 authored by Matt Schwager's avatar Matt Schwager
Browse files

Use stripos for speed improvments.

parent 832a89bf
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ class SimpleSAML_Auth_LDAP { ...@@ -100,7 +100,7 @@ class SimpleSAML_Auth_LDAP {
} }
// Enable TLS, if needed. // Enable TLS, if needed.
if (!preg_match("/ldaps:/i", $hostname) and $enable_tls) if (stripos($hostname, "ldaps:") === FALSE and $enable_tls)
if (!@ldap_start_tls($this->ldap)) if (!@ldap_start_tls($this->ldap))
throw $this->makeException('Library - LDAP __construct(): Unable to force TLS', ERR_INTERNAL); throw $this->makeException('Library - LDAP __construct(): Unable to force TLS', ERR_INTERNAL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment