Project

General

Profile

Bug #7089

multitenant : UnicodeEncodeError during login

Added by Jérôme Schneider over 4 years ago. Updated about 2 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
29 Apr 2015
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

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/

0001-user_login_failure-pass-identifier-to-smart_bytes-fo.patch View (1008 Bytes) Benjamin Dauvergne, 29 Apr 2015 05:56 PM

Associated revisions

Revision bdce3947 (diff)
Added by Benjamin Dauvergne over 4 years ago

user_login_failure: pass identifier to smart_bytes() for computing its md5 hash (#7089)

History

#1 Updated by Benjamin Dauvergne over 4 years ago

#2 Updated by Jérôme Schneider over 4 years ago

  • Status changed from Nouveau to En cours

Ack

#3 Updated by Benjamin Dauvergne over 4 years ago

  • Status changed from En cours to Solution déployée

#4 Updated by Benjamin Dauvergne over 4 years ago

  • Status changed from Solution déployée to Résolu (à déployer)

#5 Updated by Benjamin Dauvergne almost 4 years ago

  • Status changed from Résolu (à déployer) to Solution déployée

#6 Updated by Benjamin Dauvergne about 2 years ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF