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

LDAP login broken with php8.1+ #531

Closed
nebulade opened this issue May 25, 2023 · 1 comment · Fixed by #532
Closed

LDAP login broken with php8.1+ #531

nebulade opened this issue May 25, 2023 · 1 comment · Fixed by #532

Comments

@nebulade
Copy link
Contributor

While testing a package update for Cloudron for XBackBone 3.6.2, our tests found ldap login broken.

Since php 8.1 changed the result of ldap_search() from a resource to a specific class ( https://www.php.net/manual/en/class.ldap-result.php ) the login fails.

This is caused by the is_resource check at https://github.com/SergiX44/XBackBone/blob/master/app/Controllers/Auth/AuthController.php#L97 which now always fails. I am not sure what the implications for this are for php 7 but changing that to:

if (!$ldapSearchResp) {

fixes the issue for php 8.1+

I could also create a PR for this if wanted, but I guess we first have to get a better picture on how to check for the result in both php7 and php8.

@gramakri
Copy link
Contributor

gramakri commented May 25, 2023

Given that PHP 7.4 is deprecated/EOL, it's probably not needed to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants