fixed encryption of note history

This commit is contained in:
azivner
2017-11-16 00:22:00 -05:00
parent c190c738a2
commit 379431eefd
5 changed files with 22 additions and 48 deletions

View File

@@ -16,7 +16,7 @@ router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
for (const hist of history) {
if (hist.is_protected) {
hist.note_title = data_encryption.decryptCbcString(dataKey, data_encryption.noteTitleIv(hist.note_history_id), hist.note_title);
hist.note_text = data_encryption.decryptCbcString(dataKey, data_encryption.noteTitleIv(hist.note_history_id), hist.note_text);
hist.note_text = data_encryption.decryptCbcString(dataKey, data_encryption.noteTextIv(hist.note_history_id), hist.note_text);
}
}