fix(#1545): empty strings encryption

enable empty strings to be encrypted
This commit is contained in:
Martin Meciar 2024-02-15 19:01:07 +01:00
parent bd002ca316
commit b6abc665a5
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class EnvironmentSecretsStore {
}
isValidValue(val) {
return val && typeof val === 'string' && val.length > 0;
return typeof val === 'string' && val.length >= 0;
}
storeEnvSecrets(collectionPathname, environment) {

View File

@ -48,7 +48,7 @@ function safeStorageDecrypt(str) {
}
function encryptString(str) {
if (!str || typeof str !== 'string' || str.length === 0) {
if (typeof str !== 'string') {
throw new Error('Encrypt failed: invalid string');
}