-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314 from tchapgouv/311-forgot-password-broken-by-…
…element-web-upgrade-to-v11112 add patch to remove authorization header
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
patches/remove-authorization-header-in-reset-password/matrix-react-sdk+3.59.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |