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

State gets viciously trampled when opening registration link from alternate homeserver #6875

Closed
michaelkaye opened this issue Jun 14, 2018 · 0 comments

Comments

@michaelkaye
Copy link
Contributor

Steps to reproduce:

  • Login using riot.im/app to a homeserver (say matrix.org)
  • Open an incognito window
  • Sign up in that incognito window to another homeserver, verifying your email address
  • Click link in email, which opens in the non-incognito window by default
  • State for the matrix.org server gets overwritten by the brand new state from the alternate homeserver, including e2e keys, without prompting or being able to back up.

Given the way the email flow works, it's very easy to get your configurations broken by this, and it's not obvious how to fix it (in fact, you can't if you don't have other devices with e2e keys).

Suggestions on addressing this could include either (or all) of:

  • Prompt before overwriting the locally stored data, especially if there are e2e keys there.
  • The registration window should do the email registration then ask "you to return to your original window to complete the process" - all the page did was to record that you have successfully clicked the link - rather than continue to log you into the system and override state. That would allow the incognito window to retain the information.
  • Store data in local storage / indexdb keyed first by "riot.im", then by the homeserver name, then by the current structure. Doing a copy to the new location on riot-web upgrade would retain all the current information. This might be the beginnings of a front page "which of your homeservers would you like to log into" UI experience, or dynamic changes between them in different windows.
@ara4n ara4n added the P1 label Sep 11, 2018
@turt2live turt2live self-assigned this Mar 6, 2019
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Mar 8, 2019
Fixes element-hq/element-web#6875

Instead of overwriting what we have, we'll load the session we have and try to warn the user that they have verified an address for someone else.
turt2live added a commit to matrix-org/matrix-react-sdk that referenced this issue Mar 8, 2019
Fixes element-hq/element-web#6875

Instead of overwriting what we have, we'll load the session we have and try to warn the user that they have verified an address for someone else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants