Bug #8571
Un accès à /backoffice/admin/roles/SQDSQD devrait retourner une 404
Début:
08 octobre 2015
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Si l'id n'existe pas, on a pour le moment une trace, il faudrait une 404.
: type = '<type 'exceptions.KeyError'>', value = '' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/qommon/storage.py", line 340, in get_filename 338 if ignore_errors: 339 return None > 340 raise KeyError() 341 except ImportError as e: 342 if ignore_errors: locals: ignore_errors = False ignore_migration = False cls = <class 'wcs.roles.Role'> filename = '/var/lib/wcs-au-quotidien/meaux.test.au-quotidien.com/roles/35c' File "/usr/lib/python2.7/dist-packages/wcs/qommon/storage.py", line 279, in get 277 filename = os.path.join(cls.get_objects_dir(), fix_key(id)) 278 return cls.get_filename(filename, ignore_errors=ignore_errors, > 279 ignore_migration=ignore_migration) 280 get = classmethod(get) 281 locals: ignore_errors = False ignore_migration = False id = '35c' cls = <class 'wcs.roles.Role'> filename = '/var/lib/wcs-au-quotidien/meaux.test.au-quotidien.com/roles/35c' File "/usr/lib/python2.7/dist-packages/wcs/admin/roles.py", line 76, in __init__ 74 75 def __init__(self, component): > 76 self.role = Role.get(component) 77 self.role_ui = RoleUI(self.role) 78 get_response().breadcrumb.append((component + '/', self.role.name)) locals: self = <wcs.admin.roles.RolePage object at 0x6931590> component = '35c'
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Fichier 0001-backoffice-return-404-for-URIs-that-do-not-match-any.patch 0001-backoffice-return-404-for-URIs-that-do-not-match-any.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 plus de 8 ans
- Statut changé de En cours à Résolu (à déployer)
commit 5fefd5603eb622b13eb22935ce88cd224a6cc359 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Dec 28 17:07:34 2015 +0100 backoffice: return 404 for URIs that do not match any role (#8571)
backoffice: return 404 for URIs that do not match any role (#8571)