mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
data key is not encrypted with aes-cbc as well
This commit is contained in:
@@ -92,8 +92,8 @@ async function protectNote(note, dataKey, protect) {
|
||||
changed = true;
|
||||
}
|
||||
else if (!protect && note.is_protected) {
|
||||
note.note_title = data_encryption.decryptCbc(dataKey, data_encryption.noteTitleIv(note.note_id), note.note_title);
|
||||
note.note_text = data_encryption.decryptCbc(dataKey, data_encryption.noteTextIv(note.note_id), note.note_text);
|
||||
note.note_title = data_encryption.decryptCbcString(dataKey, data_encryption.noteTitleIv(note.note_id), note.note_title);
|
||||
note.note_text = data_encryption.decryptCbcString(dataKey, data_encryption.noteTextIv(note.note_id), note.note_text);
|
||||
note.is_protected = false;
|
||||
|
||||
changed = true;
|
||||
@@ -121,8 +121,8 @@ async function protectNoteHistory(noteId, dataKey, protect) {
|
||||
history.is_protected = true;
|
||||
}
|
||||
else {
|
||||
history.note_title = data_encryption.decryptCbc(dataKey, data_encryption.noteTitleIv(history.note_history_id), history.note_title);
|
||||
history.note_text = data_encryption.decryptCbc(dataKey, data_encryption.noteTextIv(history.note_history_id), history.note_text);
|
||||
history.note_title = data_encryption.decryptCbcString(dataKey, data_encryption.noteTitleIv(history.note_history_id), history.note_title);
|
||||
history.note_text = data_encryption.decryptCbcString(dataKey, data_encryption.noteTextIv(history.note_history_id), history.note_text);
|
||||
history.is_protected = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user