mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-30 22:06:11 +01:00
Backport #26107 by @wxiaoguang Just like others (oauth2 secret, internal token, etc), do not generate if no install lock Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commite2596b0a99
) (cherry picked from commit78722734fe
)
This commit is contained in:
parent
8126dadc8d
commit
1d900bc6a9
|
@ -63,7 +63,7 @@ func loadLFSFrom(rootCfg ConfigProvider) error {
|
|||
LFS.JWTSecretBytes = make([]byte, 32)
|
||||
n, err := base64.RawURLEncoding.Decode(LFS.JWTSecretBytes, []byte(LFS.JWTSecretBase64))
|
||||
|
||||
if err != nil || n != 32 {
|
||||
if (err != nil || n != 32) && InstallLock {
|
||||
LFS.JWTSecretBase64, err = generate.NewJwtSecretBase64()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error generating JWT Secret for custom config: %v", err)
|
||||
|
|
Loading…
Reference in a new issue