nginx-ldap icon indicating copy to clipboard operation
nginx-ldap copied to clipboard

Prevent error when wrong username was provided

Open arkigabor opened this issue 8 years ago • 0 comments

When a wrong password was provided check_auth returns with false. But when a wrong username was provided there is an unhandled error:

...
    ldap_connection.simple_bind_s(data['distinguishedName'][0], passwd)
TypeError: list indices must be integers, not str

Because of this the proxy replies with 500 error and nginx doesn't prompt for account details again. This can be prevented by checking that distinguishedName is present in data.

arkigabor avatar Oct 12 '17 19:10 arkigabor