Projet

Général

Profil

Bug #7089

multitenant : UnicodeEncodeError during login

Ajouté par Jérôme Schneider il y a presque 9 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
29 avril 2015
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
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/


Fichiers

Révisions associées

Révision bdce3947 (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

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

Historique

#1

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

#2

Mis à jour par Jérôme Schneider il y a presque 9 ans

  • Statut changé de Nouveau à En cours

Ack

#3

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Statut changé de En cours à Solution déployée
#4

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Statut changé de Solution déployée à Résolu (à déployer)
#5

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF