Fix env config parsing for "GITEA____APP_NAME" (#26001) (#26013)

Backport #26001 by @wxiaoguang

Regression of #24832 

Fix the bug and add a test for it

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabotandwxiaoguang authored and GitHub committed 2023-07-20 11:56:36 +02:00
1 parent 1ba0baa030
commit 4d5e3b9372
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -86,7 +86,7 @@ func decodeEnvSectionKey(encoded string) (ok bool, section, key string) {
key += remaining
}
section = strings.ToLower(section)
ok = section != "" && key != ""
ok = key != ""
if !ok {
section = ""
key = ""