From bb0d0fc515aa60ed4cb17cebfd2bedb1e10056f9 Mon Sep 17 00:00:00 2001 From: olivier Date: Tue, 22 Nov 2022 17:05:50 +0100 Subject: [PATCH] add patch to remove authorization header --- patches/patches.json | 6 ++++++ .../matrix-react-sdk+3.59.0.patch | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch diff --git a/patches/patches.json b/patches/patches.json index a4b3951d2d..ba5ef02e00 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -145,5 +145,11 @@ "src/components/views/rooms/EventTile.tsx", "res/css/views/elements/_TooltipButton.pcss" ] + }, + "remove-authorization-header-in-reset-password": { + "package": "matrix-react-sdk", + "files": [ + "src/PasswordReset.ts" + ] } } diff --git a/patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch b/patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch new file mode 100644 index 0000000000..b95c87052b --- /dev/null +++ b/patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/matrix-react-sdk/src/PasswordReset.ts b/node_modules/matrix-react-sdk/src/PasswordReset.ts +index df812ba..a92e1aa 100644 +--- a/node_modules/matrix-react-sdk/src/PasswordReset.ts ++++ b/node_modules/matrix-react-sdk/src/PasswordReset.ts +@@ -42,6 +42,11 @@ export default class PasswordReset { + this.client = createClient({ + baseUrl: homeserverUrl, + idBaseUrl: identityUrl, ++ //:tchap: specify useAuthorization header to false to avoid this bug : ++ //https://github.com/tchapgouv/tchap-web-v4/issues/311 ++ //very strange this regression ++ //if we do not set it to false, a Authorization Bearer token undefined is sent to the server ++ useAuthorizationHeader: false + }); + this.clientSecret = this.client.generateClientSecret(); + }