Authentication with not set header-variable and auto-register leads authentication with user (null) #5216

Closed
opened 2025-11-02 06:18:10 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @crackytsi on GitHub (Apr 9, 2020).

  • Gitea version (or commit ref): 1.9.6
  • Operating system: RHEL
  • 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:

Description

When authentication using header variables, but the variable is not provided and auto-register is enabled, a user "(null)" gets registered.
I expect that instead of this illegal user (with illegal attributes) the login fails and instead the user can try to login using user/password.

Originally created by @crackytsi on GitHub (Apr 9, 2020). - Gitea version (or commit ref): 1.9.6 - Operating system: RHEL - Database (use `[x]`): - [ ] PostgreSQL - [X] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ## Description When authentication using header variables, but the variable is not provided and auto-register is enabled, a user "(null)" gets registered. I expect that instead of this illegal user (with illegal attributes) the login fails and instead the user can try to login using user/password.
GiteaMirror added the issue/not-a-bug label 2025-11-02 06:18:10 -06:00
Author
Owner

@guillep2k commented on GitHub (Apr 10, 2020):

I'd suggest upgrading to 1.11.4. Version 1.9.6 is too old. Less than a year, I know, but a lot of code has been written since then. 😉

@guillep2k commented on GitHub (Apr 10, 2020): I'd suggest upgrading to 1.11.4. Version 1.9.6 is too old. Less than a year, I know, but a lot of code has been written since then. 😉
Author
Owner

@lafriks commented on GitHub (Apr 10, 2020):

Please update to latest version and reopen if bug still present

@lafriks commented on GitHub (Apr 10, 2020): Please update to latest version and reopen if bug still present
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5216