mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-23 07:09:01 +01:00
fix(#1545): empty strings encryption
enable empty strings to be encrypted
This commit is contained in:
parent
bd002ca316
commit
b6abc665a5
@ -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