Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Forgot password" broken by element-web upgrade to v1.11.12 #311

Closed
estellecomment opened this issue Nov 18, 2022 · 7 comments · Fixed by #314
Closed

"Forgot password" broken by element-web upgrade to v1.11.12 #311

estellecomment opened this issue Nov 18, 2022 · 7 comments · Fixed by #314
Assignees
Labels
bug Something isn't working P1 Priority 1 regression - caused by update

Comments

@estellecomment
Copy link
Contributor

"Forgot password" works on localhost with v4.1.0_1.11.10
It is broken on localhost at commit 5d44525

@estellecomment estellecomment added the bug Something isn't working label Nov 18, 2022
@github-actions github-actions bot added the web label Nov 18, 2022
@estellecomment
Copy link
Contributor Author

Latest commits, since tag tchap-4.1.0_1.11.10

The most suspicious is the merge of element-web-v1.11.12.

@estellecomment
Copy link
Contributor Author

estellecomment commented Nov 18, 2022

Yup! element-web merge broke it.
c1b522c works (just before element-web upgrade)
39ba458 is broken (element-web upgrade)

Edit : relevent PRs to see diffs :
Tchap-web : https://github.com/tchapgouv/tchap-web-v4/pull/285/files
React-sdk : https://github.com/tchapgouv/matrix-react-sdk-fork/pull/3/files
Js-sdk : https://github.com/betagouv/matrix-js-sdk-fork/pull/1/files#

@estellecomment estellecomment changed the title "Forgot password" hass broken, sometime after v4.1.0_1.11.10 "Forgot password" broken by element-web upgrade to v1.11.12 Nov 18, 2022
@estellecomment
Copy link
Contributor Author

OLM versions :

element-web 1.11.10 : olm-3.2.12
element-web 1.11.12 : olm-3.2.12

react-sdk 3.58.1 : olm-3.2.8
react-sdk 3.59.0 : olm-3.2.8

js-sdk 20.1.0 : olm-3.2.12
js-sdk 21.0.0 : olm-3.2.13 -> mismatch with element-web ?

But element-web 1.11.14 with olm-3.2.12 has a working password reset (tested on app.element.io). So probably not.

@estellecomment estellecomment self-assigned this Nov 18, 2022
@estellecomment
Copy link
Contributor Author

I don't see a difference in the requests and responses sent in the two cases.
POST /matrix/client/r0/account/password/email/requestToken
POST /_matrix/client/r0/account/password

The error we get is 401
{"errcode":"M_UNKNOWN_TOKEN","error":"Invalid macaroon passed.","soft_logout":false}
From googling around, it's a problem with the token ?

@odelcroi
Copy link
Member

The error happens because a "Authorization Bearer undefined" is sent to the server when hitting the /password endpoint.
POST /_matrix/client/r0/account/password
The backend does not like it then return a 401 invalid macaroon

@odelcroi odelcroi linked a pull request Nov 22, 2022 that will close this issue
3 tasks
@estellecomment
Copy link
Contributor Author

Temporary PR : https://github.com/tchapgouv/tchap-web-v4/pull/314/files
Before merging it, it would be good to understand why this is happening.

@estellecomment
Copy link
Contributor Author

Problem is fixed in 1.11.13, the bad header is not present any more and the forgot password flow works.
So we can either apply the patch or upgrade to 1.11.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Priority 1 regression - caused by update
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants