mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-22 07:53:34 +01:00
Merge pull request #1600 from mato-meciar/bugfix/empty-pwd-basic-auth
fix(#1545): empty strings encryption
This commit is contained in:
commit
c7c762185e
@ -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) {
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user