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

Any logged in user can obtain all user emails #4502

Closed
2 of 7 tasks
glitch003 opened this issue Jul 23, 2018 · 10 comments · Fixed by #4512
Closed
2 of 7 tasks

Any logged in user can obtain all user emails #4502

glitch003 opened this issue Jul 23, 2018 · 10 comments · Fixed by #4512
Labels
modifies/api This PR adds API routes or modifies them pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/bug
Milestone

Comments

@glitch003
Copy link

  • Gitea version (or commit ref): 1.4.3
  • Git version: 2.17.1
  • Operating system: Ubuntu 14.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

Using the user search API, any logged in user can obtain emails of other gitea users.

For example, log into try.gitea.io then try hitting https://try.gitea.io/api/v1/users/search?q=chris in your browser and you will see the email addresses of all users with "chris" in their name.

I would suggest that showing emails should be off by default except for when viewed by admin users.

Thanks!

@johanhugg
Copy link

johanhugg commented Jul 24, 2018

Where in that example does it show the email address? I tried searching for my name, and a part of my email that is not in my name, and it didn't show up.

I have also looked at the code for this before and it shouldn't consider email.

@adelowo
Copy link
Member

adelowo commented Jul 24, 2018

It shows the email only if you are signed in...

@johanhugg
Copy link

Oh, whoops. Yeah, just tried, that definitely seems like a bug.

@adelowo
Copy link
Member

adelowo commented Jul 24, 2018

This looks like something that should be fixed ... #4490 is kind of similar except for admins

@lafriks
Copy link
Member

lafriks commented Jul 25, 2018

Why should not it show emails in API?

@glitch003
Copy link
Author

Well, why does it already block showing emails if the user making the request is not logged in?

I figured the reasons are user privacy and not wanting spammers to use Gitea instances as a place to harvest email addresses.

I think most web services let users choose whether or not to expose their email, and few expose it by default. Github has a "Keep my email address private" option, for example.

@johanhugg
Copy link

Yeah, the keep email private option is misleading then, since it doesn't

@lafriks
Copy link
Member

lafriks commented Jul 25, 2018

API should respect keep email private address setting. If it does not it is a bug

@johanhugg
Copy link

untitled

Please try this for yourself on the try.gitea instance

@ghost
Copy link

ghost commented Jul 25, 2018

Would love to know when the fix will be officially released for this.

Chris do check your email. :)

@lafriks lafriks added this to the 1.6.0 milestone Jul 25, 2018
@lafriks lafriks added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Jul 25, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants