-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Hash user IDs by default for improved privacy #1335
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
base: main
Are you sure you want to change the base?
Conversation
- Enabled by default, but optional
- Improves privacy of guests as their user id does not automatically leak their email address (e.g. avatars in chats and more)
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@@ -85,14 +81,20 @@ protected function execute(InputInterface $input, OutputInterface $output) { | |||
return 1; | |||
} | |||
|
|||
$email = $input->getArgument('email'); | |||
if ($this->config->useHashedEmailAsUserID()) { | |||
$email = strtolower($email); |
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.
Should that be mb_strtolower like in UserBackend?
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.
mb is not allowed in user ids nor in emails, so not sure it's required?
$users[(string)$row['uid']] = [ | ||
'email' => (string)$row['email'], | ||
'displayname' => (string)$row['displayname'], | ||
]; |
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.
nit: a generator may make sense here: Do all guests fit in memory?
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.
getDisplayNames() above is basically doing the same thing. Just had to do an array as value so we can have email + displayname