Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle LDAP serch errors #13929

Conversation

cedric-anne
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets see #13396

When ldap_search() fails, trying to parse results lead to following error:

PHP Warning (2): ldap_parse_result() expects parameter 2 to be resource, bool given in /var/www/html/src/AuthLDAP.php at line 1868

All the logic of user research being a big plate of spaghetti, it is difficult to implement a clear message on UI/console, but proposed change will probably make log messages clearer and could help to debug..

Copy link
Contributor

@trasher trasher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but hard to test

@cedric-anne cedric-anne added this to the 10.0.7 milestone Feb 1, 2023
@cedric-anne cedric-anne added the bug label Feb 1, 2023
@trasher trasher merged commit 86687fc into glpi-project:10.0/bugfixes Feb 3, 2023
@cedric-anne cedric-anne deleted the 10.0/handle-ldap-search-failure branch February 3, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants