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

500 returned trying to git clone with user that cannot sign in #7558

Closed
2 of 7 tasks
robxu9 opened this issue Jul 22, 2019 · 0 comments · Fixed by #7586
Closed
2 of 7 tasks

500 returned trying to git clone with user that cannot sign in #7558

robxu9 opened this issue Jul 22, 2019 · 0 comments · Fixed by #7586
Labels
Milestone

Comments

@robxu9
Copy link

robxu9 commented Jul 22, 2019

  • Gitea version (or commit ref): 1.8.1
  • Git version: 2.20.1
  • Operating system: Gitea Docker Image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
2019/07/22 02:04:57 [...s/context/context.go:238 func1()] [E] UserSignIn: user is not allowed login [uid: 5, name: <username>]
2019/07/22 02:04:57 [...routers/repo/http.go:205 HTTP()] [E] UserSignIn error: %v: user is not allowed login [uid: 5, name: <username>]

Description

When trying to git clone with an account that is activated but has disable sign in checked, Gitea returns 500. It should return a more appropriate HTTP status code, i.e. 401 or 403, since 500 may lead people to believe that something is wrong on Gitea's side when it isn't.

(The context for this was that I was trying to get a user account that was allowed read-only git access, but not web ui access - like a service account. I tried to keep the account active but disabled sign-in...)

Screenshots

N/A

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants