DirectoryTree / LdapRecord

A fully-featured LDAP framework.
https://ldaprecord.com
MIT License
500 stars 44 forks source link

start_tls_error on invalid password, invalid username, lockouts, expiry all working normal #703

Closed stevebauman closed 5 months ago

stevebauman commented 5 months ago

Discussed in https://github.com/DirectoryTree/LdapRecord/discussions/702

Originally posted by **Narfmeister** February 21, 2024 Hi, I'm currently attempting to implement ldapRecord and am having luck with authenticating and reading user details. What I'm encountering is when an invalid password is supplied I receive an LdapRecord \LdapRecordException of `ldap_start_tls(): Unable to start TLS: Local error.` What seems odd is that after 3 attempts, the account is locked out in ActiveDirectory and returns the correct lock out message. Something odd seems to be happening specifically when an invalid password is supplied. Supplying an invalid username for example seems to appear as expected: ![image](https://github.com/DirectoryTree/LdapRecord-Laravel/assets/25217203/d84758de-9925-497b-8481-a3a262d0b990) I'm just following along with the Laravel Breeze guide in the documentation and I'm not sure where I've gone wrong as the authentication appears to be succeeding and other exceptions such as lockouts & invalid usernames appear to be processing correctly. It's only invalid passwords where this is happening. Has anyone experienced this or have any advice? I'm currently using Laravel 10.45.0 with ldaprecord-laravel 3.4.0 and PHP 8.3.3 Cheers