Project

General

Profile

Bug #58992

ValidationError: ["La valeur «\xa00123456789\xa0» n'est pas un UUID valide."]

Added by Sentry IO 9 days ago. Updated 5 days ago.

Status:
Solution déployée
Priority:
Normal
Assignee:
Target version:
-
Start date:
25 Nov 2021
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

https://sentry.entrouvert.org/entrouvert/nfrance/issues/53975/

ValueError: badly formed hexadecimal UUID string
  File "django/db/models/fields/__init__.py", line 2343, in to_python
    return uuid.UUID(**{input_form: value})
  File "uuid.py", line 160, in __init__
    raise ValueError('badly formed hexadecimal UUID string')

ValidationError: ["La valeur «\xa00123456789\xa0» n'est pas un UUID valide."]
(15 additional frame(s) were not displayed)
...
  File "django/db/models/lookups.py", line 260, in process_rhs
    return super().process_rhs(compiler, connection)
  File "django/db/models/lookups.py", line 95, in process_rhs
    return self.get_db_prep_lookup(value, connection)
  File "django/db/models/lookups.py", line 187, in get_db_prep_lookup
    [get_db_prep_value(value, connection, prepared=True)]
  File "django/db/models/fields/__init__.py", line 2333, in get_db_prep_value
    value = self.to_python(value)
  File "django/db/models/fields/__init__.py", line 2348, in to_python
    params={'value': value},

Error occurred while processing request

Files

Associated revisions

Revision 7ebcbcf7 (diff)
Added by Nicolas Roche 8 days ago

toulouse_smart: validate uuid parameter format (#58992)

History

#1

Updated by Lauréline Guerin 9 days ago

  • Project changed from Suivi des traces to Passerelle
#2

Updated by Nicolas Roche 9 days ago

  • Assignee set to Nicolas Roche

C'est le connecteur Toulouse smart, donc je me le suis assigné.
A priori la trace provient d'un test (l'url correcte est envoyé à l'appelant, comme c'est fait dans chrono).

endpoint POST /toulouse-smart/smart-preprod/update-intervention?uuid=0123456789

Donc ça ne devrait pas (trop) se reproduire et ça me laisse le temps de corriger (relever l'exception mais en 200 ou 400).

#3

Updated by Nicolas Roche 9 days ago

#4

Updated by Benjamin Dauvergne 9 days ago

  • Status changed from Solution proposée to Solution validée
#5

Updated by Nicolas Roche 8 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 7ebcbcf78e599890b60405aa2847e4682833d1af
Author: Nicolas ROCHE <nroche@entrouvert.com>
Date:   Thu Nov 25 18:07:33 2021 +0100

    toulouse_smart: validate uuid parameter format (#58992)
#6

Updated by Frédéric Péters (absent jusqu’au 12/12) 5 days ago

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

Also available in: Atom PDF