Open kas0109 opened 6 years ago
Also this https://github.com/ASKBOT/askbot-devel/blob/master/askbot/deps/django_authopenid/ldap_auth.py#L89, results in following error:
File "/usr/local/lib/python2.7/site-packages/askbot-0.10.2-py2.7.egg/askbot/deps/django_authopenid/ldap_auth.py", line 75, in ldap_authenticate_default for key, value in options: ValueError: too many values to unpack
Should be options.items()
Hi ! Not sure if this is a new issue but If someone is using LDAP without a master login/passwd then this line tries to search the active directory before even binding https://github.com/ASKBOT/askbot-devel/blob/master/askbot/deps/django_authopenid/ldap_auth.py#L123.
The binding is done later at https://github.com/ASKBOT/askbot-devel/blob/master/askbot/deps/django_authopenid/ldap_auth.py#L132 and thus the previous line results in an exception since we cannot search LDAP dir without binding (https://www.python-ldap.org/en/latest/reference/ldap.html#ldap.LDAPObject.simple_bind_s ).
So i made a small change, i.e bind before you search and then was able to successfully connect to the server and retrieve search results.
After this, the default function to create a user takes in two arguments https://github.com/ASKBOT/askbot-devel/blob/master/askbot/deps/django_authopenid/ldap_auth.py#L173. Whereas when we are calling this from https://github.com/ASKBOT/askbot-devel/blob/master/askbot/deps/django_authopenid/views.py#L520 we just pass one which results in an exception again.
Am i missing something important in all of this ( some conf ) or it's a bug ?