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

[DINUM] Extract the first 3 chars during 3pid obfuscation, not just the 3rd char #316

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

anoadragon453
Copy link
Member

#311 had a typo in it which can be seen here: https://github.com/matrix-org/sydent/pull/311/files#diff-7d63b60d76737089d460f16b53428930d3b0dedbcf3e26a396155a5f22fee3b3L161-R172

This is the code that obfuscates email addresses when creating a 3PID invite for them in a room. s[:3] was changed to s[3], which mean that if we were inviting abcdef@example.com and config options were set so that this codepath was run, we'd end up with d...@example.com instead of abc...@example.com, as we were returning the 4th character (s[3]), instead of returning everything in the string up to the 4th character (s[:3]).

This PR fixes that typo.

@anoadragon453 anoadragon453 requested a review from a team October 13, 2020 16:29
Copy link
Member

@giomfo giomfo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anoadragon453 anoadragon453 merged commit 0c512d1 into dinsic Oct 13, 2020
@anoadragon453 anoadragon453 deleted the anoa/fix_obfs branch October 13, 2020 16:37
@anoadragon453 anoadragon453 removed the request for review from a team October 13, 2020 16:37
@anoadragon453 anoadragon453 changed the title Extract the first 3 chars during 3pid obfuscation, not just the 3rd char [DINUM] Extract the first 3 chars during 3pid obfuscation, not just the 3rd char Oct 14, 2020
anoadragon453 added a commit that referenced this pull request Oct 14, 2020
…har (#317)

This is a duplicate of #316 for mainline which fixed the same bug on `dinsic`. The bug originally stemmed from #311.
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.

2 participants