diff --git a/trytond/trytond/protocols/wrappers.py b/trytond/trytond/protocols/wrappers.py index 42dbbf28bc..68933f01c2 100644 --- a/trytond/trytond/protocols/wrappers.py +++ b/trytond/trytond/protocols/wrappers.py @@ -77,7 +77,13 @@ class Request(_Request): header = self.headers.get('Authorization') return parse_authorization_header(header) elif authorization.type == 'session': - return parse_session(authorization.token) + # Werkzeug may parse the session as parameters + # if the base64 uses the padding sign '=' + if authorization.token is None: + header = self.headers.get('Authorization') + return parse_authorization_header(header) + else: + return parse_session(authorization.token) return authorization @cached_property