go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.08k stars 5.41k forks source link

Logs error for DISABLE_QUERY_AUTH_TOKEN even though not specified #28758

Closed lonix1 closed 8 months ago

lonix1 commented 8 months ago

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

techknowlogick commented 8 months ago

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.

lonix1 commented 8 months ago

Thanks. So by default everyone sees this log?

lunny commented 8 months ago

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

lonix1 commented 8 months ago

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?

nodiscc commented 8 months ago

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?

lonix1 commented 8 months ago

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

Please reopen.

github-actions[bot] commented 6 months ago

Automatically locked because of our CONTRIBUTING guidelines