phpLDAPadmin icon indicating copy to clipboard operation
phpLDAPadmin copied to clipboard

htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated

Open protegh opened this issue 2 years ago • 7 comments

You get the above error with php >= 8.1 when $server->getContainer($base->getDN()) in lib\HTMLTree.php returns a null object (that's the case if you have a short, one component, rootdn in your $servers->setValue('server','base',array(...) config.

protegh avatar Aug 08 '23 16:08 protegh

Up to version 1.2.6.6 the lib/HTMLTree.php file was included but in the current master it was removed. So most likely my fix (a small change in lib/HTMLTree.php) isn't needed any more.

protegh avatar Aug 08 '23 16:08 protegh

i was just playing around with HAProxy sending the Proxy Protocol headers to my LDAP instances, so that the original source IP of the connection was available to slapd. the slapd instance has to be started with a URL like "pldap://blah" and the olcServerID values must match as well. when i did this, i came across the error message here. reverting the configs back to "ldap://blah" stopped the error messages.

not sure if or how this might be related, but it seems to be.

brendankearney avatar Sep 02 '23 00:09 brendankearney

Debian 11, phpldapadmin 1.2.6.3 and php8.2

Same error. The slapd instance runs as /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d. No olcServerID set.

vvatikiotis avatar Sep 19 '23 14:09 vvatikiotis

On what page does this occur?

williamdes avatar Sep 19 '23 15:09 williamdes

for me, with HAProxy & Proxy Protocol, the initial page threw the error, and no other pages could be loaded. it seemed to affect them all, in my case.

brendankearney avatar Sep 19 '23 16:09 brendankearney

In the Home page.

I added a few ACLs and it was magically fixed....

vvatikiotis avatar Sep 19 '23 17:09 vvatikiotis

In the Home page.

I added a few ACLs and it was magically fixed....

Okay, interesting

From the feedbacks I should have enough to investigate into it

By the way I am the one responsible for the phpldapadmin package on Debian now. Glad to see it's still used

williamdes avatar Sep 19 '23 17:09 williamdes