Bug #6015
Error raised on when oauth2 webservice called by its slug
Début:
27 novembre 2014
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
The webservice view allows to call a oauth2 webservice by its slug, but it raises an exception when it's done.
Here is an example:
ValueError at /idp/oauth2/ws-proxy/agglo/ invalid literal for int() with base 10: 'agglo'
Fichiers
Révisions associées
Historique
Mis à jour par Serghei Mihai (congés, retour 15/05) il y a plus de 9 ans
- Fichier 0001-handling-more-properly-cases-where-webservice-is-cal.patch 0001-handling-more-properly-cases-where-webservice-is-cal.patch ajouté
- Patch proposed changé de Non à Oui
Trying to cast the webservice id and handling the exception
Mis à jour par Frédéric Péters il y a plus de 9 ans
In my opinion there's a bit more to do to clean this function, it will for example still fail unexpectedly if an invalid slug is given. (but honestly I am not a fan of this fallback on slug pattern).
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
New patch handle the two cases: non numeric id and unknown slug.
Mis à jour par Benjamin Dauvergne il y a plus de 9 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2-idp-oauth2|commit:9b7d3cec1b451c9a49f6cd62ad968ea543a799e6.
Mis à jour par Serghei Mihai (congés, retour 15/05) il y a plus de 9 ans
- Statut changé de Résolu (à déployer) à Fermé
Do not crash on an invalid WebService id or an unknown WebService slug
fixes #6015