Plugin 500 Error
-
Hello,
I installed a fresh copy of this plugin wita week ago on a WordPress 4.x site and it worked fine. I tried again today with a fresh copy of the plugin and it produced a 500 error.
Am I using the plugin wrong?
Here are the errors in Apache’s log:
[Wed Apr 03 16:07:57.978727 2019] [:error] [pid 32220] [client 108.162.53.11:17150] PHP Fatal error: Call to undefined function ldap_escape() in /var/www/vhosts/teststaging-wordpress.trdev.site/web/content/wp-content/plugins/authldap/authLdap.php on line 517, referer: https://teststaging-wordpress.our.site/wp-login.php
[Wed Apr 03 16:08:49.378441 2019] [:error] [pid 32220] [client 108.162.53.11:34366] PHP Fatal error: Call to undefined function ldap_escape() in /var/www/vhosts/teststaging-wordpress.trdev.site/web/content/wp-content/plugins/authldap/authLdap.php on line 517, referer: https://teststaging-wordpress.our.site/wp-login.php?loggedout=true(Domain name of referrer changed : ) )
So, I compared the two different plugin copies and found a few changes from last week – newer is on the right:
diff -r authldap /var/www/vhosts/teststaging-wordpress.trdev.site/web/authldap
diff -r authldap/authLdap.php /var/www/vhosts/teststaging-wordpress.trdev.site/web/authldap/authLdap.php
6c6
< Version: 2.1.0
—
> Version: 2.1.1
515c515,519
< $authLDAPGroupFilter = str_replace(‘%dn%’, $dn, $authLDAPGroupFilter);
—
> $authLDAPGroupFilter = str_replace(
> ‘%dn%’,
> ldap_escape($dn, ”, LDAP_ESCAPE_FILTER),
> $authLDAPGroupFilter
> );
518c522,526
< $groups = authLdap_get_server()->search(sprintf($authLDAPGroupFilter, $username), array($authLDAPGroupAttr), $authLDAPGroupBase);
—
> $groups = authLdap_get_server()->search(
> sprintf($authLDAPGroupFilter, ldap_escape($username, ”, LDAP_ESCAPE_FILTER)),
> array($authLDAPGroupAttr),
> $authLDAPGroupBase
> );
diff -r authldap/readme.txt /var/www/vhosts/teststaging-wordpress.trdev.site/web/authldap/readme.txt
42a43,45
> = 2.1.1 =
> * Add escaping filter-values. That should help filtering for groups where the DN might contain braces or spaces
>
- The topic ‘Plugin 500 Error’ is closed to new replies.