Projet

Général

Profil

Bug #5085

Algo de signature qui plante si l'argument orig n'est pas unique

Ajouté par Thomas Noël il y a presque 10 ans. Mis à jour il y a plus de 9 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
01 juillet 2014
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Sur une requête mal formattée du type :

//myspace/json/forms?NameID=&orig=sso-vincennes.dev.entrouvert.org&algo=sha256&timestamp=
2014-07-01T13%3A36%3A10Z&nonce=7574ca9c9df681a227ccfa985ef2b529L&signature=uafwHR6ryHUlIlt
7GqzgQkNwE7qpqoRvvV5SX/0tddY%3D?NameID=&orig=sso-vincennes.dev.entrouvert.org&algo=sha256&
timestamp=2014-07-01T13%3A36%3A10Z&nonce=7574ca9c9df681a227ccfa985ef2b529L&signature=uafwH
R6ryHUlIlt7GqzgQkNwE7qpqoRvvV5SX/0tddY%3D

On a un crash car "orig" est une liste :

Exception:
  type = '<type 'exceptions.AttributeError'>', value = ''list' object has no attribute 'lo
wer''

Stack trace (most recent call first):
  File "/usr/lib/python2.7/ConfigParser.py", line 374, in optionxform
   372
   373     def optionxform(self, optionstr):
>  374         return optionstr.lower()
   375
   376     def has_option(self, section, option):

  locals:
     self = <ConfigParser.ConfigParser instance at 0x2ec18c0>
     optionstr = [u'sso-vincennes.dev.entrouvert.org', u'sso-vincennes.dev.entrouvert.org'
]

  File "/usr/lib/python2.7/ConfigParser.py", line 614, in get
   612                 vardict[self.optionxform(key)] = value
   613         d = _Chainmap(vardict, sectiondict, self._defaults)
>  614         option = self.optionxform(option)
   615         try:
   616             value = d[option]

  locals:
     d = {'__name__': 'api-secrets', 'sso-vincennes.dev.entrouvert.org': 'ongio4faitika8ei
ng7chee0ohn6Gee4moxo7dahgi'}
     vars = None
     section = 'api-secrets'
     vardict = {}
     raw = False
     sectiondict = OrderedDict([('__name__', 'api-secrets'), ('sso-vincennes.dev.entrouver
t.org', 'ongio4faitika8eing7chee0ohn6Gee4moxo7dahgi')])
     self = <ConfigParser.ConfigParser instance at 0x2ec18c0>
     option = [u'sso-vincennes.dev.entrouvert.org', u'sso-vincennes.dev.entrouvert.org']

Fichiers

Historique

#1

Mis à jour par Frédéric Péters il y a presque 10 ans

  • Statut changé de Nouveau à En cours
  • Assigné à mis à Frédéric Péters
  • Patch proposed changé de Non à Oui

Le patch attaché devrait faire l'affaire.

#4

Mis à jour par Thomas Noël il y a presque 10 ans

Impec. Merci Fred.

#5

Mis à jour par Frédéric Péters il y a presque 10 ans

  • Statut changé de En cours à Résolu (à déployer)
commit f0fa69237e1c70c7137e2df357a3ec97c38d9fa0
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon Jul 7 09:38:45 2014 +0200

    add some sanity checking of values received in authenticatd API calls (#5085)
#6

Mis à jour par Thomas Noël il y a plus de 9 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#7

Mis à jour par Thomas Noël il y a plus de 9 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF