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 authentication with incorrect password causes a 500 #18

Open
Cryptophobia opened this issue Mar 20, 2018 · 0 comments
Open

LDAP authentication with incorrect password causes a 500 #18

Cryptophobia opened this issue Mar 20, 2018 · 0 comments

Comments

@Cryptophobia
Copy link
Member

From @hankjacobs on June 7, 2017 19:48

I recently upgraded from 2.13.0 to 2.15.0. After upgrading, deis login with a valid LDAP user but an incorrect password started to fail with Error: Internal Server Error.

The following stack trace appears in the deis-controller logs:

ERROR:root:Uncaught Exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/ldap/ldapobject.py", line 265, in _ldap_call
    result = func(*args,**kwargs)
ldap.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/views.py", line 486, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/authtoken/views.py", line 17, in post
    serializer.is_valid(raise_exception=True)
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/serializers.py", line 237, in is_valid
    self._validated_data = self.run_validation(self.initial_data)
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/serializers.py", line 435, in run_validation
    value = self.validate(value)
  File "/usr/local/lib/python3.5/dist-packages/rest_framework/authtoken/serializers.py", line 16, in validate
    user = authenticate(username=username, password=password)
  File "/usr/local/lib/python3.5/dist-packages/django/contrib/auth/__init__.py", line 100, in authenticate
    user = backend.authenticate(*args, **credentials)
  File "/usr/local/lib/python3.5/dist-packages/django_auth_ldap/backend.py", line 171, in authenticate
    user = ldap_user.authenticate(password)
  File "/usr/local/lib/python3.5/dist-packages/django_auth_ldap/backend.py", line 344, in authenticate
    self._authenticate_user_dn(password)
  File "/usr/local/lib/python3.5/dist-packages/django_auth_ldap/backend.py", line 460, in _authenticate_user_dn
    self._bind_as(self.dn, password, sticky=sticky)
  File "/usr/local/lib/python3.5/dist-packages/django_auth_ldap/backend.py", line 765, in _bind_as
    force_str(bind_password))
  File "/usr/local/lib/python3.5/dist-packages/ldap/ldapobject.py", line 386, in simple_bind_s
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
  File "/usr/local/lib/python3.5/dist-packages/ldap/ldapobject.py", line 682, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "/usr/local/lib/python3.5/dist-packages/ldap/ldapobject.py", line 689, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/local/lib/python3.5/dist-packages/ldap/ldapobject.py", line 273, in _ldap_call
    e.args[0]['info'] = strerror(e.args[0]['errno'])
KeyError: 'errno'
10.68.167.81 "POST /v2/auth/login/ HTTP/1.1" 500 25 "Deis Client v2.15.0"

Copied from original issue: deis/controller#1307

duanhongyi added a commit to duanhongyi/controller that referenced this issue Jan 3, 2021
chore(controller): change status\binding model type and mount path ch…
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