diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8c371262..857f17166 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -248,6 +248,7 @@ stages: inputs: script: | docker stop $(docker ps -aq) + docker container prune -f - task: CmdLine@2 displayName: Prepare unittests and coverage for upload inputs: diff --git a/passbook/api/auth.py b/passbook/api/auth.py index 8d0f3f18b..37a702857 100644 --- a/passbook/api/auth.py +++ b/passbook/api/auth.py @@ -22,7 +22,13 @@ def token_from_header(raw_header: bytes) -> Optional[Token]: "Unsupported authentication type, denying", type=auth_type.lower() ) return None - auth_credentials = b64decode(auth_credentials.encode()).decode() + try: + auth_credentials = b64decode(auth_credentials.encode()).decode() + except UnicodeDecodeError: + # TODO: Remove this workaround + # temporary fallback for 0.11 to 0.12 upgrade + # 0.11 and below proxy sends authorization header not base64 encoded + auth_credentials = auth_credentials # Accept credentials with username and without if ":" in auth_credentials: _, password = auth_credentials.split(":")