mirror of
1
Fork 0

Revert "Avoid writing config file if not installed (#26107) (#26113)"

This reverts commit 78722734fe.

It does not create `LFS_JWT_SECRET` if `INSTALL_LOCK` is true and the
value of `LFS_JWT_SECRET` found in `app.ini` is incorrect. As a result
LFS_JWT_SECRET will not be set at all and the Forgejo admin will not
be notified that the value in the `app.ini` was ignored.
This commit is contained in:
Earl Warren 2023-07-30 09:30:36 +02:00
parent fb8de41e05
commit a1986507b7
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 1 additions and 1 deletions

View File

@ -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) && InstallLock {
if err != nil || n != 32 {
LFS.JWTSecretBase64, err = generate.NewJwtSecretBase64()
if err != nil {
return fmt.Errorf("error generating JWT Secret for custom config: %v", err)