Skip to content

Commit 1d61840

Browse files
committed
fix: env decryption + remove log
1 parent 4b25e89 commit 1d61840

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

server/env/persist_env.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package env
22

33
import (
44
"encoding/json"
5-
"fmt"
65
"log"
76
"os"
87
"strconv"
@@ -35,7 +34,12 @@ func GetEnvData() (envstore.Store, error) {
3534

3635
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
3736

38-
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(env.EnvData))
37+
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)
38+
if err != nil {
39+
return result, err
40+
}
41+
42+
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(b64DecryptedConfig))
3943
if err != nil {
4044
return result, err
4145
}
@@ -81,8 +85,6 @@ func PersistEnv() error {
8185
return err
8286
}
8387

84-
fmt.Println("decryptedEncryptionKey:", decryptedEncryptionKey)
85-
8688
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
8789

8890
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)

0 commit comments

Comments
 (0)