10000 feat: Hash user IDs by default for improved privacy by nickvergessen · Pull Request #1335 · nextcloud/guests · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nickvergessen
Copy link
Member
  • 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>
@nickvergessen nickvergessen added enhancement New feature or request 3. to review Waiting for reviews labels May 1, 2025
@nickvergessen nickvergessen self-assigned this May 1, 2025
@@ -85,14 +81,20 @@ protected function execute(InputInterface $input, OutputInterface $output) {
return 1;
}

$email = $input->getArgument('email');
if ($this->config->useHashedEmailAsUserID()) {
$email = strtolower($email);
Copy link
Contributor

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?

Copy link
Member Author

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?

Comment on lines +279 to +282
$users[(string)$row['uid']] = [
'email' => (string)$row['email'],
'displayname' => (string)$row['displayname'],
];
Copy link
Contributor

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?

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0