Development #42825
valider le paramètre order_by reçu en querystring
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
13 mai 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'psycopg2.ProgrammingError'>', value = 'missing FROM-clause entry for table "blah" LINE 1: ...entifiants_benefic WHERE anonymised IS NULL ORDER BY blah.me ^ ' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/sql.py", line 1339, in get_sorted_ids 1337 else: 1338 sql_statement += ' ORDER BY %s' % order_by.replace('-', '_') > 1339 cur.execute(sql_statement, parameters) 1340 ids = [x[0] for x in cur.fetchall()] 1341 conn.commit() ... REQUEST_URI '/backoffice/management/demande-d-identifiants-beneficiaire/?1=on&...&order_by=blah.me
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a presque 4 ans
ou
Exception: type = '<class 'psycopg2.ProgrammingError'>', value = 'unterminated quoted string at or near "'"" LINE 1: ..._d_identifiants_benefic WHERE anonymised IS NULL ORDER BY '" ^
etc.
Mis à jour par Frédéric Péters il y a presque 4 ans
- Fichier 0001-misc-check-order_by-parameter-is-a-correct-identifie.patch 0001-misc-check-order_by-parameter-is-a-correct-identifie.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a presque 4 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Frédéric Péters il y a presque 4 ans
commit c34a405504ea8a7d4902e0bb2118b5a3f81f9835 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Wed May 13 12:51:07 2020 +0200 misc: check order_by parameter is a correct identifier (#42825)
Mis à jour par Frédéric Péters il y a presque 4 ans
- Statut changé de Solution validée à Solution déployée
misc: check order_by parameter is a correct identifier (#42825)