Bug #7089
multitenant : UnicodeEncodeError during login
Start date:
29 April 2015
Due date:
% Done:
0%
Estimated time:
Patch proposed:
Yes
Planning:
Description
When I'm trying to login into https://imio.authentic.dev.entrouvert.org/. I have this error :
Stacktrace (appel le plus récent en dernier) : File "django/core/handlers/base.py", line 111, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "django/views/decorators/csrf.py", line 57, in wrapped_view return view_func(*args, **kwargs) File "django/utils/decorators.py", line 105, in _wrapped_view response = view_func(request, *args, **kwargs) File "django/views/decorators/cache.py", line 52, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "authentic2/views.py", line 261, in login response = frontend.login(request, context_instance=context_instance) File "authentic2/auth_frontends.py", line 39, in login utils.csrf_token_check(request, form) File "authentic2/utils.py", line 413, in csrf_token_check if form.is_valid() and not getattr(request, 'csrf_processing_done', False): File "django/forms/forms.py", line 162, in is_valid return self.is_bound and not bool(self.errors) File "django/forms/forms.py", line 154, in errors self.full_clean() File "django/forms/forms.py", line 354, in full_clean self._clean_form() File "django/forms/forms.py", line 378, in _clean_form cleaned_data = self.clean() File "django/contrib/auth/forms.py", line 192, in clean password=password) File "django/contrib/auth/__init__.py", line 60, in authenticate user = backend.authenticate(**credentials) File "authentic2/backends/ldap_backend.py", line 392, in authenticate user = self.authenticate_block(block, uid, password) File "authentic2/backends/ldap_backend.py", line 481, in authenticate_block return self._return_user(authz_id, password, conn, block) File "authentic2/backends/ldap_backend.py", line 823, in _return_user block, attributes) File "authentic2/backends/ldap_backend.py", line 844, in _return_django_user user_login_success(user.get_username()) File "authentic2/user_login_failure.py", line 12, in user_login_success cache.delete(key(identifier)) File "authentic2/user_login_failure.py", line 9, in key return 'user-login-failure-%s' % hashlib.md5(identifier).hexdigest()
For more informations : https://sentry.entrouvert.org/dev/dev/group/1284/
Files
Associated revisions
History
Updated by Benjamin Dauvergne almost 8 years ago
- File 0001-user_login_failure-pass-identifier-to-smart_bytes-fo.patch 0001-user_login_failure-pass-identifier-to-smart_bytes-fo.patch added
- Assignee set to Benjamin Dauvergne
- Target version set to 2.2.0
- Patch proposed changed from No to Yes
Updated by Benjamin Dauvergne over 7 years ago
- Status changed from Solution déployée to Résolu (à déployer)
Updated by Benjamin Dauvergne almost 7 years ago
- Status changed from Résolu (à déployer) to Solution déployée
user_login_failure: pass identifier to smart_bytes() for computing its md5 hash (#7089)