mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
make encryption more robust in face of null values, #1483
This commit is contained in:
parent
fc4edf4aa7
commit
7133e60267
@ -43,10 +43,18 @@ function decryptNotes(notes) {
|
||||
}
|
||||
|
||||
function encrypt(plainText) {
|
||||
if (plainText === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return dataEncryptionService.encrypt(getDataKey(), plainText);
|
||||
}
|
||||
|
||||
function decrypt(cipherText) {
|
||||
if (cipherText === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return dataEncryptionService.decrypt(getDataKey(), cipherText);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user