Logs error for DISABLE_QUERY_AUTH_TOKEN even though not specified #12322

Closed
opened 2025-11-02 10:05:34 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @lonix1 on GitHub (Jan 11, 2024).

Description

When my gite docker instance starts it logs this:

2024/01/10 06:58:15 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24.

But in my app.ini I did not set DISABLE_QUERY_AUTH_TOKEN.

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

SQLite

Originally created by @lonix1 on GitHub (Jan 11, 2024). ### Description When my gite docker instance starts it logs this: > 2024/01/10 06:58:15 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24. But in my `app.ini` I did not set `DISABLE_QUERY_AUTH_TOKEN`. ### Gitea Version 1.21.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database SQLite
GiteaMirror added the type/question label 2025-11-02 10:05:34 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jan 11, 2024):

This log happens when the value is set to false, but default it is false. So if you don't have it defined, then it'll be false and show you the warning.

@techknowlogick commented on GitHub (Jan 11, 2024): This log happens when the value is set to false, but default it is false. So if you don't have it defined, then it'll be false and show you the warning.
Author
Owner

@lonix1 commented on GitHub (Jan 12, 2024):

Thanks. So by default everyone sees this log?

@lonix1 commented on GitHub (Jan 12, 2024): Thanks. So by default everyone sees this log?
Author
Owner

@lunny commented on GitHub (Jan 12, 2024):

I think IsSet should be checked. If user haven't set it. It can be ignored.

@lunny commented on GitHub (Jan 12, 2024): I think `IsSet` should be checked. If user haven't set it. It can be ignored.
Author
Owner

@lonix1 commented on GitHub (Jan 12, 2024):

If this is in the log for everyone, I'm surprised I'm the first to mention it 😄

Maybe we can reopen the issue?

@lonix1 commented on GitHub (Jan 12, 2024): If this is in the log for everyone, I'm surprised I'm the first to mention it :smile: Maybe we can reopen the issue?
Author
Owner

@nodiscc commented on GitHub (Jan 12, 2024):

This error message sneaks into the stdout for the gitea actions generate-runner-token command and breaks scripts which use the output of this command to register runners (https://github.com/nodiscc/xsrv/blob/master/roles/gitea_act_runner/tasks/act-runner.yml#L176).

I think the message should not be displayed at all if DISABLE_QUERY_AUTH_TOKEN is not set at all in the configuration file.

Can we reopen this?

@nodiscc commented on GitHub (Jan 12, 2024): This error message sneaks into the stdout for the `gitea actions generate-runner-token` command and breaks scripts which use the output of this command to register runners (https://github.com/nodiscc/xsrv/blob/master/roles/gitea_act_runner/tasks/act-runner.yml#L176). I think the message should not be displayed at all if `DISABLE_QUERY_AUTH_TOKEN` is not set at all in the configuration file. Can we reopen this?
Author
Owner

@lonix1 commented on GitHub (Jan 13, 2024):

Yes it is a false positive and will cause more confusion and more issues on the repo.

Please reopen.

@lonix1 commented on GitHub (Jan 13, 2024): Yes it is a false positive and will cause more confusion and more issues on the repo. Please reopen.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12322