diff options
author | Jason Song <i@wolfogre.com> | 2023-07-25 13:06:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 05:06:31 +0000 |
commit | 862f748b2b33adb571b8b87e8d1635b8e8ac50d9 (patch) | |
tree | cfec12ea18e4083d0a768519568932df272fe6e0 /modules/setting/lfs.go | |
parent | d0bdfbc5458a30c36cbf749a2976881cd4478418 (diff) | |
download | gitea-862f748b2b33adb571b8b87e8d1635b8e8ac50d9.tar.gz gitea-862f748b2b33adb571b8b87e8d1635b8e8ac50d9.zip |
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">
Diffstat (limited to 'modules/setting/lfs.go')
-rw-r--r-- | modules/setting/lfs.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/lfs.go b/modules/setting/lfs.go index 4d9424f997..0e0f7b74e3 100644 --- a/modules/setting/lfs.go +++ b/modules/setting/lfs.go @@ -53,7 +53,7 @@ func loadLFSFrom(rootCfg ConfigProvider) error { return nil } - LFS.JWTSecretBase64 = loadSecret(rootCfg.Section("lfs"), "LFS_JWT_SECRET_URI", "LFS_JWT_SECRET") + LFS.JWTSecretBase64 = loadSecret(rootCfg.Section("server"), "LFS_JWT_SECRET_URI", "LFS_JWT_SECRET") LFS.JWTSecretBytes = make([]byte, 32) n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64)) |