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

Regression of #24832 

Fix the bug and add a test for it

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguangandGiteabot authored and GitHub committed 2023-07-20 09:16:29 +00:00
1 parent d7a8d09da0
commit 28ecac8024
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 = ""