[DINUM] Extract the first 3 chars during 3pid obfuscation, not just the 3rd char #316
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#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 tos[3]
, which mean that if we were invitingabcdef@example.com
and config options were set so that this codepath was run, we'd end up withd...@example.com
instead ofabc...@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.