Closed
Description
- Gitea version (or commit ref): 1.1.3
- Git version: 2.11
- Operating system: Debian Stretch
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL) https://try.gitea.io/user/login
- No
- Not relevant
- Log gist:
Description
When purposely causing a login error on Gitea, I can see (using web inspector and/or logfiles) that the HTTP return code is 200, i.e. "everything is ok", for the page that presents the error to the user.
It would be great if Gitea would return a 401 ("Unauthorized", see here).
Indeed, I think a 401 code in the webserver logs has great security value, and makes it easy to integrate with solutions such as Fail2Ban and others.
If this change were made, there would be absolutely no impact on the user.