You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -492,6 +492,11 @@ INTERNAL_TOKEN=
492
492
;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.
493
493
;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
494
494
;SUCCESSFUL_TOKENS_CACHE_SIZE = 20
495
+
;;
496
+
;; Reject API tokens sent in URL query string (Accept Header-based API tokens only). This avoids security vulnerabilities
497
+
;; stemming from cached/logged plain-text API tokens.
498
+
;; In future releases, this will become the default behavior
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.")
ctx.Resp.Header().Set("Warning", "token and access_token API authentication is deprecated and will be removed in gitea 1.23. Please use AuthorizationHeaderToken instead. Existing queries will continue to work but without authorization.")
815
+
}
816
+
}
817
+
791
818
// Routes registers all v1 APIs routes to web application.
0 commit comments