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

AccountSettings: escape forward- and backslashes in MXIDs #846

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

KitsuneRal
Copy link
Member

Fixes #842.

@KitsuneRal
Copy link
Member Author

The test is screwed (and should really be a unit test, not a part of quotest) but the functionality seems to be working, as just tried in Quaternion.

@KitsuneRal KitsuneRal force-pushed the kitsune/fix-forward-slashes-in-mxids branch from 7a220b8 to f82ebbf Compare December 22, 2024 12:33
@TobiasFella
Copy link
Member

TobiasFella commented Dec 22, 2024

This makes the account load fine, but it's not yet perfect: my test account with mxid @tobias/:matrix.org is shown as @tobias%2F:matrix.org.

(some other things are also broken, but I'd look at those in different issues / patches) actually those might just be symptoms of that problem, let's see

@KitsuneRal KitsuneRal force-pushed the kitsune/fix-forward-slashes-in-mxids branch from f82ebbf to a60dfa8 Compare December 22, 2024 20:35
@KitsuneRal
Copy link
Member Author

We could add unescaping in some other places; I'm just trying to stay conservative. Technically, it's possible to recover MXIDs even at the Settings level, by parsing the key and only (un)escaping only the piece that looks like an MXID - e.g., by using the fact that nobody's using : in key names so far, outside of the account names.

@KitsuneRal
Copy link
Member Author

Looks like the Windows runner doesn't allow me to store settings in the registry?..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accounts with user ids containing forward slashes can't be loaded correctly
2 participants