fix: env decryption + remove log
This commit is contained in:
parent
4b25e8941c
commit
1d61840c6d
10
server/env/persist_env.go
vendored
10
server/env/persist_env.go
vendored
|
@ -2,7 +2,6 @@ package env
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
|
@ -35,7 +34,12 @@ func GetEnvData() (envstore.Store, error) {
|
|||
|
||||
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
|
||||
|
||||
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(env.EnvData))
|
||||
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
||||
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(b64DecryptedConfig))
|
||||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
|
@ -81,8 +85,6 @@ func PersistEnv() error {
|
|||
return err
|
||||
}
|
||||
|
||||
fmt.Println("decryptedEncryptionKey:", decryptedEncryptionKey)
|
||||
|
||||
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
|
||||
|
||||
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)
|
||||
|
|
Loading…
Reference in New Issue
Block a user