Bug #53345
/inspect vs clé invalide
Début:
22 avril 2021
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
(pas trouvée dans sentry)
Exception: type = '<class 'KeyError'>', value = ''form_var_adresse_pays_iso-3'' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 234, in __getitem__ 232 def __getitem__(self, key): 233 if not self.valid_key_regex.match(key): > 234 raise KeyError(key) 235 parts = key.split('_') 236 try: locals: key = 'form_var_adresse_pays_iso-3' ... File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 180, in flatten 178 if not depth: 179 return > 180 item = self[base] 181 flat_keys[base] = item 182 if hasattr(item, 'inspect_keys'): ... File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 196, in flatten 194 new_base = '%s_%s' % (base, sub_key) 195 flat_keys[new_base] = None > 196 flatten(new_base, depth=new_depth) 197 198 for key in self.keys(): locals: base = 'form_var_adresse_pays' ... File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 199, in get_flat_keys 197 198 for key in self.keys(): > 199 flatten(key) 200 201 return flat_keys.keys() ... File "/usr/lib/python3/dist-packages/wcs/backoffice/management.py", line 3261, in inspect 3259 return v 3260 > 3261 for k in sorted(substvars.get_flat_keys()): 3262 if k in ('attachments',): ...
Fichiers
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
Frédéric Péters a écrit :
(pas trouvée dans sentry)
[...]
https://sentry.entrouvert.org/entrouvert/gplexpert/issues/44313/?query=application%3Awcs
Mis à jour par Frédéric Péters il y a environ 3 ans
- Fichier 0001-misc-don-t-expose-extra-keys-with-invalid-format-as-.patch 0001-misc-don-t-expose-extra-keys-with-invalid-format-as-.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Lauréline Guérin il y a environ 3 ans
- Statut changé de Solution proposée à Solution validée
- Assigné à changé de Frédéric Péters à Benjamin Dauvergne
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
- Assigné à changé de Benjamin Dauvergne à Frédéric Péters
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 711cecc69af51b2dfe9715d208b96baa6cace406 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Thu Apr 22 13:57:32 2021 +0200 misc: don't expose extra keys with invalid format as variables (#53345)
Mis à jour par Frédéric Péters il y a environ 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
misc: don't expose extra keys with invalid format as variables (#53345)