You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2017-11-28 19:13:08,163] ERROR in app: Exception on /api/v1/login [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "./test_api/api/v1/views.py", line 141, in login
test = ldap.bind_user(user, passwd)
File "/usr/local/lib/python3.5/dist-packages/flask_simpleldap/__init__.py", line 153, in bind_user
conn.simple_bind_s(user_dn.decode('utf-8'), password)
AttributeError: 'str' object has no attribute 'decode'
[pid: 76|app: 0|req: 1/1] XXX.XXX.XXX.XXX () {40 vars in 802 bytes} [Tue Nov 28 19:13:06 2017] POST /api/v1/login =>
generated 291 bytes in 1897 msecs (HTTP/1.1 500) 2 headers in 84 bytes (1 switches on core 0)
Changing this to conn.simple_bind_s(user_dn, password) seems to fix the problem for me.
The text was updated successfully, but these errors were encountered:
This might be a regression between 1.1.2 and 1.2.0:
ae9eecf#diff-df961969fdc0fcec2f458e0fbb16eef9R153
Traceback:
Changing this to
conn.simple_bind_s(user_dn, password)
seems to fix the problem for me.The text was updated successfully, but these errors were encountered: