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..140fe62b3f --- /dev/null +++ b/patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch @@ -0,0 +1,17 @@ +diff --git a/node_modules/matrix-react-sdk/src/PasswordReset.ts b/node_modules/matrix-react-sdk/src/PasswordReset.ts +index df812ba..1020aff 100644 +--- a/node_modules/matrix-react-sdk/src/PasswordReset.ts ++++ b/node_modules/matrix-react-sdk/src/PasswordReset.ts +@@ -42,6 +42,12 @@ 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 ++ // if we do not set it to false, a Authorization Bearer token undefined is sent to the server, which refuses the invalid token. ++ // Regression introduced by element-web 1.11.12, solved by upgrading to 1.11.13. ++ useAuthorizationHeader: false ++ // end :TCHAP: + }); + this.clientSecret = this.client.generateClientSecret(); + }