Skip to content

Commit 862f748

Browse files
authored
Fix loading LFS_JWT_SECRET from wrong section (#26109)
Regression of #25408. `LFS_JWT_SECRET_URI` and `LFS_JWT_SECRET` are under the `server` section, not `lfs`. So each time gitea restarts, it resets `LFS_JWT_SECRET`. <img width="1378" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/527ec9b9-eea2-4334-a274-6d1471456edd">
1 parent d0bdfbc commit 862f748

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/setting/lfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func loadLFSFrom(rootCfg ConfigProvider) error {
5353
return nil
5454
}
5555

56-
LFS.JWTSecretBase64 = loadSecret(rootCfg.Section("lfs"), "LFS_JWT_SECRET_URI", "LFS_JWT_SECRET")
56+
LFS.JWTSecretBase64 = loadSecret(rootCfg.Section("server"), "LFS_JWT_SECRET_URI", "LFS_JWT_SECRET")
5757

5858
LFS.JWTSecretBytes = make([]byte, 32)
5959
n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64))

0 commit comments

Comments
 (0)