Skip to content

LDAP login broken with php8.1+ #531

@nebulade

Description

@nebulade

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions