Skip to content

Deprecate query string auth tokens #28390

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

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add setting warning
  • Loading branch information
jackHay22 committed Dec 11, 2023
commit 078748e229968776f99e61bd9f163e4bf68ed67b
6 changes: 5 additions & 1 deletion modules/setting/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ func loadSecurityFrom(rootCfg ConfigProvider) {
}
}

// TODO: default value should be true immediately after 1.22.0 has been released, so that 1.23.0 ships with the change
// TODO: default value should be true in future releases
DisableQueryAuthToken = sec.Key("DISABLE_QUERY_AUTH_TOKEN").MustBool(false)

if !DisableQueryAuthToken {
log.Warn("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.")
}
}