mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 19:26:07 +00:00
fix: handle empty string to allow clearing secret on update
This commit is contained in:
@@ -414,12 +414,13 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
type: KmsDataKey.SecretManager,
|
type: KmsDataKey.SecretManager,
|
||||||
projectId
|
projectId
|
||||||
});
|
});
|
||||||
const encryptedValue = secretValue
|
const encryptedValue =
|
||||||
? {
|
typeof secretValue === "string"
|
||||||
encryptedValue: secretManagerEncryptor({ plainText: Buffer.from(secretValue) }).cipherTextBlob,
|
? {
|
||||||
references: getAllSecretReferences(secretValue).nestedReferences
|
encryptedValue: secretManagerEncryptor({ plainText: Buffer.from(secretValue) }).cipherTextBlob,
|
||||||
}
|
references: getAllSecretReferences(secretValue).nestedReferences
|
||||||
: {};
|
}
|
||||||
|
: {};
|
||||||
|
|
||||||
if (secretValue) {
|
if (secretValue) {
|
||||||
const { nestedReferences, localReferences } = getAllSecretReferences(secretValue);
|
const { nestedReferences, localReferences } = getAllSecretReferences(secretValue);
|
||||||
|
|||||||
Reference in New Issue
Block a user