Merge pull request #1600 from mato-meciar/bugfix/empty-pwd-basic-auth

fix(#1545): empty strings encryption
This commit is contained in:
Anoop M D 2024-02-21 20:17:12 +05:30 committed by GitHub
commit c7c762185e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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');
}