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

usernames can overlap with api actions (eg: search) #9061

Closed
2 of 7 tasks
ederuiter opened this issue Nov 18, 2019 · 4 comments · Fixed by #9063
Closed
2 of 7 tasks

usernames can overlap with api actions (eg: search) #9061

ederuiter opened this issue Nov 18, 2019 · 4 comments · Fixed by #9063

Comments

@ederuiter
Copy link

  • Gitea version (or commit ref): 1.11.0+dev-213-g173da1b5a
  • Git version: 2.22.0
  • Operating system: linux
  • 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

Gitea allows you to create a user with the username "search" after creating this user, the user will not be retrievable via the api as the url for this is /api/v1/users/search which overlaps with the search action.

@jolheiser
Copy link
Member

jolheiser commented Nov 18, 2019

This is reproducible on try. I created a profile for the username in question.

https://try.gitea.io/search
https://try.gitea.io/api/v1/users/search vs https://try.gitea.io/api/v1/users/jolheiser

@sapk
Copy link
Member

sapk commented Nov 18, 2019

@6543 I just submitted a PR sorry if you have started working on it.

@6543
Copy link
Member

6543 commented Nov 18, 2019

this is no huge deal - i found this issue and remember that i had looked at this part of the code a few days before ... so i know this are two lines of code ... HARD To Find/Fix @sapk ;) [sarcasm]

@sapk
Copy link
Member

sapk commented Nov 18, 2019

same reason here 😄

@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
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants