Project

General

Profile

Bug #94795

auth_oidc: comportement sur réception d'attribut invalide (exemple téléphone)

Added by Sentry Io 4 days ago. Updated 4 days ago.

Status:
En cours
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03 September 2024
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Actuellement le SSO échoue sur un crash, peut-être l'attribut devrait-il être ignoré, ou un message propre affiché ?

https://sentry.entrouvert.org/entrouvert/publik/issues/129949/

NumberParseException: (1) The string supplied did not seem to be a phone number.
  File "authentic2/attribute_kinds.py", line 159, in validate_phone_number
    phonenumbers.parse(value)
  File "phonenumbers/phonenumberutil.py", line 2921, in parse
    raise NumberParseException(NumberParseException.NOT_A_NUMBER,

NumberParseException: (1) The string supplied did not seem to be a phone number.
  File "authentic2/attribute_kinds.py", line 162, in validate_phone_number
    phonenumbers.parse(
  File "phonenumbers/phonenumberutil.py", line 2921, in parse
    raise NumberParseException(NumberParseException.NOT_A_NUMBER,

ValidationError: ['Le numéro de téléphone doit être composable en France métropolitaine (par exemple 06 39 98 01 23).']
(14 additional frame(s) were not displayed)
...
  File "rest_framework/fields.py", line 751, in run_validation
    return super().run_validation(data)
  File "rest_framework/fields.py", line 547, in run_validation
    value = self.to_internal_value(data)
  File "authentic2/attribute_kinds.py", line 206, in to_internal_value
    data = super().to_internal_value(clean_number(data))
  File "authentic2/attribute_kinds.py", line 181, in clean_number
    validate_phone_number(cleaned_number)
  File "authentic2/attribute_kinds.py", line 167, in validate_phone_number
    raise ValidationError(

History

#1

Updated by Frédéric Péters 4 days ago

  • Project changed from Suivi des traces to Authentic 2
#2

Updated by Serghei Mihai 4 days ago

  • Subject changed from oidc, comportement sur réception d'attribut invalide (exemple téléphone) to auth_oidc: comportement sur réception d'attribut invalide (exemple téléphone)
#3

Updated by Robot Gitea 4 days ago

  • Status changed from Nouveau to Solution proposée
  • Assignee set to Serghei Mihai

Serghei Mihai (smihai) a ouvert une pull request sur Gitea concernant cette demande :

#4

Updated by Robot Gitea 4 days ago

  • Status changed from Solution proposée to En cours

Benjamin Dauvergne (bdauvergne) a relu et demandé des modifications sur une pull request sur Gitea concernant cette demande :

Also available in: Atom PDF