Projet

Général

Profil

Development #47566

erreur au moment du log d'une erreur de liaison

Ajouté par Frédéric Péters il y a plus de 3 ans. Mis à jour il y a plus de 3 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
12 octobre 2020
Echéance:
% réalisé:

0%

Temps estimé:
Hors marché:
Non
Patch proposed:
Oui
Planning:
Non

Description

File "/usr/lib/python3/dist-packages/authentic2_auth_fc/views.py" in get
  385.                 return self.uniqueness_check_failed(request)

File "/usr/lib/python3/dist-packages/authentic2_auth_fc/views.py" in uniqueness_check_failed
  367.                                  ' linked with another account.').format(self.fc_display_name))

File "/usr/lib/python3/dist-packages/authentic2_auth_fc/views.py" in fc_display_name
  335.         return u'{0} {1}'.format(self.user_info['family_name'], self.user_info['given_name'])

Exception Type: KeyError at /fc/callback/
Exception Value: 'family_name'

Fichiers

Révisions associées

Révision 4e0be8c7 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

auth_fc: add tests on login with minimal user_info (#47566)

Révision cbd43d4f (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

auth fc: make fc_display_name more resilient (#47566)

Révision 2600bfab (diff)
Ajouté par Benjamin Dauvergne il y a plus de 3 ans

auth_fc: update first_name and last_name only when required (#47566)

Historique

#1

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

  • Assigné à mis à Benjamin Dauvergne
#2

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

#3

Mis à jour par Frédéric Péters il y a plus de 3 ans

Il y a aussi sur la même situation d'absence d'attribut

  File "django/contrib/auth/__init__.py", line 116, in _authenticate_with_backend
    return backend.authenticate(*args, **credentials)
  File "authentic2_auth_fc/backends.py", line 73, in authenticate
    logger.debug(u'updated (given_name : %s - family_name : %s)', user_info['given_name'],
KeyError: 'given_name'

(via https://sentry.entrouvert.org/entrouvert/publik/issues/5736/)

#5

Mis à jour par Paul Marillonnet il y a plus de 3 ans

  • Statut changé de Solution proposée à Solution validée

Typo dans 0002 :

if user_info.get('family_name') and user.first_name != user_info['family_name']:

C'est user.last_name.

Sinon c'est ok.

#8

Mis à jour par Paul Marillonnet il y a plus de 3 ans

  • Statut changé de Solution proposée à Solution validée

Ack (tout comme #48042).

#9

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

  • Statut changé de Solution validée à Résolu (à déployer)
commit 2600bfab909cc91623dc880fabdd14245a5bf0d1
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu Oct 15 10:44:05 2020 +0200

    auth_fc: update first_name and last_name only when required (#47566)

commit cbd43d4f4ce9f1ff75db32bfee266ab528f4cced
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Oct 13 09:33:35 2020 +0200

    auth fc: make fc_display_name more resilient (#47566)

commit 4e0be8c7c3906d6c65181648c15281818d403c12
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Mon Oct 26 20:16:47 2020 +0100

    auth_fc: add tests on login with minimal user_info (#47566)
#10

Mis à jour par Frédéric Péters il y a plus de 3 ans

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

Formats disponibles : Atom PDF