Development #46835
auth http basic, gérer le base64 invalide
Début:
21 septembre 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'binascii.Error'>', value = 'Invalid base64-encoded string: number of data characters (61) cannot be 1 more than a multiple of 4' Stack trace (most recent call first): File "/usr/lib/python3.7/base64.py", line 546, in decodebytes 544 """Decode a bytestring of base-64 data into a bytes object.""" 545 _input_type_check(s) > 546 return binascii.a2b_base64(s) 547 548 def decodestring(s): locals: s = b'PGltZyBzcmM9eFx4MTBvbmVycm9yPSJqYXZhc2NyaXB0OmFsZXJ0KDEpIj4%3d' File "/usr/lib/python3.7/base64.py", line 554, in decodestring 552 "use decodebytes()", 553 DeprecationWarning, 2) > 554 return decodebytes(s) 555 556 locals: s = b'PGltZyBzcmM9eFx4MTBvbmVycm9yPSJqYXZhc2NyaXB0OmFsZXJ0KDEpIj4%3d' warnings = <module 'warnings' from '/usr/lib/python3.7/warnings.py'> File "/usr/lib/python3/dist-packages/wcs/qommon/http_request.py", line 56, in get_user 54 if auth_header.startswith('Basic '): 55 auth_header = auth_header.split(' ', 1)[1] > 56 username, password = force_text(base64.decodestring(force_bytes(auth_header))).split(':', 1) 57 from .ident.password_accounts import PasswordAccount 58 try: locals: auth_header = '...' self = <wcs.compat.CompatHTTPRequest object at 0x7fc3d299bfd0>
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Fichier 0001-misc-ignore-invalid-HTTP-basic-authentication-header.patch 0001-misc-ignore-invalid-HTTP-basic-authentication-header.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a plus de 3 ans
- Statut changé de Solution proposée à Solution validée
à pousser dès que jenkins est vert
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit af5cf63d950f20964eed2fcdaf992bcffbaee271 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Sep 21 15:10:23 2020 +0200 misc: ignore invalid HTTP basic authentication header (#46835)
Mis à jour par Frédéric Péters il y a plus de 3 ans
- Statut changé de Résolu (à déployer) à Solution déployée
misc: ignore invalid HTTP basic authentication header (#46835)