Projet

Général

Profil

« Précédent | Suivant » 

Révision cd3002be

Ajouté par Serghei Mihai il y a environ 8 ans

  • ID cd3002be5f3347b45a5c7ffff38916e011c8c8c9
  • Parent ace55618

compare hmac signature with lower case (#10617)

Voir les différences:

ckanext/ozwillo_organization_api/plugin.py
36 36
                    computed_hmac = hmac.new(api_secret, request.body, sha1).hexdigest()
37 37
                    # the received hmac is uppercase according to
38 38
                    # http://doc.ozwillo.com/#ref-3-2-1
39
                    if received_hmac != computed_hmac.upper():
39
                    if received_hmac.lower() != computed_hmac:
40 40
                        log.info('Invalid HMAC')
41 41
                        raise logic.NotAuthorized(_('Invalid HMAC'))
42 42
                else:

Formats disponibles : Unified diff