Skip to content

Commit

Permalink
Merge pull request #314 from tchapgouv/311-forgot-password-broken-by-…
Browse files Browse the repository at this point in the history
…element-web-upgrade-to-v11112

add patch to remove authorization header
  • Loading branch information
estellecomment authored Nov 23, 2022
2 parents 290e43c + 3533f3d commit c75e33a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
Original file line number Diff line number Diff line change
@@ -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();
}

0 comments on commit c75e33a

Please sign in to comment.