Skip to content

Prevent error when wrong username was provided #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arkigabor
Copy link

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.

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 this pull request may close these issues.

1 participant