Skip to content

Commit 3758975

Browse files
Import additional secrets via file uri
Fixes go-gitea#25034
1 parent df5cf5d commit 3758975

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

modules/setting/lfs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ func loadLFSFrom(rootCfg ConfigProvider) error {
5353
return nil
5454
}
5555

56+
LFS.JWTSecretBase64 = loadSecret(rootCfg.Section("lfs"), "LFS_JWT_SECRET_URI", "LFS_JWT_SECRET")
57+
5658
LFS.JWTSecretBytes = make([]byte, 32)
5759
n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64))
5860

modules/setting/oauth2.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ func loadOAuth2From(rootCfg ConfigProvider) {
116116
return
117117
}
118118

119+
OAuth2.JWTSecretBase64 = loadSecret(rootCfg.Section("oauth2"), "JWT_SECRET_URI", "JWT_SECRET")
120+
119121
if !filepath.IsAbs(OAuth2.JWTSigningPrivateKeyFile) {
120122
OAuth2.JWTSigningPrivateKeyFile = filepath.Join(AppDataPath, OAuth2.JWTSigningPrivateKeyFile)
121123
}

0 commit comments

Comments
 (0)