When the password of the user contains an accented character like "à" or "ç" for instance, the following exception is raised :
/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-06-27 01:57:29,526 MSG: pagesize.py:process_exception:43 File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/django/core/handlers/base.py", line 99, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/django/utils/decorators.py", line 48, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/deps/django_authopenid/views.py", line 317, in signin
login_form.cleaned_data['password']
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/deps/django_authopenid/util.py", line 643, in ldap_check_password
ldap_session.simple_bind_s(username, password)
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/ldap/ldapobject.py", line 206, in simple_bind_s
msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/ldap/ldapobject.py", line 200, in simple_bind
return self._ldap_call(self._l.simple_bind,who,cred,EncodeControlTuples(serverctrls),EncodeControlTuples(clientctrls))
File "/data/local/virtualenv/askbot/lib/python2.6/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
result = func(*args,**kwargs)
/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-06-27 01:57:29,527 MSG: pagesize.py:process_exception:44 <type 'exceptions.UnicodeEncodeError'>
/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-06-27 01:57:29,527 MSG: pagesize.py:process_exception:45 'ascii' codec can't encode character u'\xe7' in position 0: ordinal not in range(128)
/data/local/virtualenv/askbot/lib/python2.6/site-packages/askbot/middleware/pagesize.py TIME: 2011-06-27 01:57:29,527 MSG: pagesize.py:process_exception:54 path: /account/signin/
method: POST
data: <QueryDict: {u'username': [u'user'], u'openid_login_token': [u''], u'password_action': [u'login'], u'next': [u'/'], u'login_provider_name': [u'local'], u'login_with_password': [u'Sign in'], u'csrfmiddlewaretoken': [u'e630f38ee4a67878c8e28d1cd6411ac0'], u'password': [u'XXXXXX']}>
host: ask
user: AnonymousUser
My askbot server is running on a redhat distribution.
This one is not easy, I need to istall LDAP and test here. Looks like simple_bind_s() does not like the unicode password. Maybe it needs to be encoded somehow before sending over.
Does your LDAP work with the unicode passwords otherwise?
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.
create your Q&A siteAsked: 2011-06-27 02:26:41 -0500
Seen: 172 times
Last updated: Jun 27 '11
ldap connection authorized if the password not filled even for an unknown user
Internal Server Error when trying to edit personal pro
Where are the badges in a fresh install? [fixed]
HTML Tags in titles getting eaten <fixed/>
Unknown column 'auth_user.is_approved' in 'field list' [fixed]
email for comments: link missing a href [fixed]
Bug: Horizontal Rule in Comment breaks stylesheet [fixed]
"Related questions" section shows deleted questions?
error on upvote: "Sorry, something is not right here..." [fixed]
Copyright Askbot, 2010-2011. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.