-
Notifications
You must be signed in to change notification settings - Fork 85
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
Change out the triple-dot sequence in third-party invites to an ellipsis character #324
Conversation
Besides a slightly nicer presentation, this can be useful when email addresses that contain period characters are obfuscated. Consider the address: `[email protected]`. If this address ends up being obfuscated to `firstname....@exa...`, we end up with a slightly odd-looking sequence of four periods on the left-hand side. With an ellipsis character, we'd instead get `firstname.…@exa…`, which is still a little odd, but is clearer with regards to what exactly was obfuscated.
This allows processing the ellipsis character in Python 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be OK. I assume there's no issues here with using a non-ASCII character?
:type characters_to_reveal: int | ||
|
||
:return: The redacted string. | ||
:rtype: unicode | ||
""" | ||
ellipsis_character = u"…" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably just be inlined in each place it is used? Unless there's a plan to make this configurable. If you want to keep it, I might call this obfuscation_string
or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really a plan, no. I think I did it out of habit, but it indeed doesn't bring much value.
I'm not entirely sure. I know that clients regularly handle them in usernames, and I know that Sydent's database can handle them. Synapse presumably accepts them. This will be tested on DINUM's preprod beforehand at least. cc @giomfo |
Besides a slightly nicer presentation, this can be useful when email addresses that contain period characters are obfuscated. Consider the address:
[email protected]
.If this address is obfuscated to
firstname....@exa...
, we end up with a slightly odd-looking sequence of four periods on the left-hand side.With an ellipsis character, we'd instead get
firstname.…@exa…
, which is still a little odd, but is clearer with regards to what exactly was obfuscated.Applying this to the
dinsic
branch as it grew out of a dinsic PR conversation, but will be ported to mainline with the rest of the obfuscated code it touches.Not sponsored as this was not a paid-for request.