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 with phhp 8.2 throws Error 500 #1284

Open
hartundweich opened this issue Sep 2, 2024 · 1 comment
Open

LDAP Login with phhp 8.2 throws Error 500 #1284

hartundweich opened this issue Sep 2, 2024 · 1 comment

Comments

@hartundweich
Copy link

I'm using this framework now since 2019.
Today I tried to update php from 7.4 to 8.2
Everything is working except LDAP Authentication. If I put wrong credentials in the login fields I get a Error 500 and throwing "LDAP connection failure" from fatfree Framework.
I debugged a little bit and recognized that ldap_bind() in lib/auth.php is throwing an error except returning false.

What can I do to suppress this error 500?

Thanks for your time to give a little hint...

Best
Andreas

@hartundweich
Copy link
Author

hartundweich commented Sep 3, 2024

I'm a little bit further...
Maybe it would be better to split Auth Class LDAP Function in some parts to check if LDAP is configured correctly:

1.) Check if LDAP host can be reached - if not: throw Error 500
2.) Check if given credentials from config work to connect to LDAP host - if not: throw Error 500
3.) Check if given login from login form is working: if not - show error message and return to login form

Point 3 can onyl be achived if we do not run this line in auth.php
user_error(self::E_LDAP,E_USER_ERROR);

To solve my problem at the moment I replaced the line above by
return false;

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

No branches or pull requests

1 participant