Bug #6921
UnicodeEncodeError sur champ password "cleartext" accentué
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
09 avril 2015
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Extrait de la trace (données modifiées) :
Exception: type = '<type 'exceptions.UnicodeEncodeError'>', value = ''ascii' codec can't encode character u'\u20ac' in position 8: ordinal not in range(128)' Stack trace (most recent call first): File "/usr/lib/python2.6/site-packages/wcs/sql.py", line 620, in get_sql_dict_from_data 618 if field.key in ('ranked-items', 'password'): 619 # turn {'poire': 2, 'abricot': 1, 'pomme': 3} into an array > 620 value = [[x, str(y)] for x, y in value.items()] 621 elif sql_type == 'varchar': 622 pass locals: sql_type = 'text[][]' sql_dict = {'f1': 'nom', 'f2': 'prenom', 'f3': datetime.datetime(2003, 9, 23, 0, 0), 'f4': 'xxxx@example.com', ...} value = {u'cleartext': u'123abczh29\u20ac'} (...)
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 9 ans
En marge, je viens de pousser l'exécution des tests de test_formdata.py et test_register.py en mode SQL, en plus du mode pickle par défaut. Ça permettra de produire assez facilement un test correspondant à ce ticket.
Mis à jour par Frédéric Péters il y a environ 9 ans
- Fichier 0002-tests-add-check-of-password-with-8bits-characters.patch 0002-tests-add-check-of-password-with-8bits-characters.patch ajouté
- Fichier 0001-sql-handle-unicode-elements-in-ranked-items-and-pass.patch 0001-sql-handle-unicode-elements-in-ranked-items-and-pass.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Mis à jour par Frédéric Péters il y a environ 9 ans
- Statut changé de En cours à Résolu (à déployer)
commit 01bb7ef83c8f24e6ef69406ded4122dddd939de2 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sat Apr 11 21:32:57 2015 +0200 tests: add check of password with 8bits characters commit 2a792d23d725d82ad7c7fba7750ee9cfecc254fc Author: Frédéric Péters <fpeters@entrouvert.com> Date: Sat Apr 11 21:22:09 2015 +0200 sql: handle unicode elements in ranked-items and password fields (#6921)
sql: handle unicode elements in ranked-items and password fields (#6921)