Bug #41819
crash validation iban sur exposant
Début:
17 avril 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'ValueError'>', value = 'invalid literal for int() with base 10: '1²9152700'' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/qommon/misc.py", line 765, in validate_iban 763 if not dummy_iban_converted.isdigit(): 764 return False > 765 return int(iban_key) == 98 - int(dummy_iban_converted) % 97
'1²9152700'.isdigit() → True.
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-misc-only-allow-ascii-numbers-in-IBAN-and-other-chec.patch 0001-misc-only-allow-ascii-numbers-in-IBAN-and-other-chec.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Il y a .isdecimal()
en py3 aussi mais ok.
>>> '²'.isdecimal() False >>> '123'.isdecimal() True
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 9c0a2851ed1f8f445bfdc17903554dd2d81d2384 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Fri Apr 17 12:22:37 2020 +0200 misc: only allow ascii numbers in IBAN and other checks (#41819)
Mis à jour par Frédéric Péters il y a environ 4 ans
Oui mais de la doc, ARABIC-INDIC DIGIT ZERO,
'٠'.isdecimal() True
(ça passerait dans le int() mais pas top).
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
misc: only allow ascii numbers in IBAN and other checks (#41819)