From 5d531216d9126375e139e43b00c2732ce44248d5 Mon Sep 17 00:00:00 2001 From: azivner Date: Wed, 27 Sep 2017 00:15:00 -0400 Subject: [PATCH] decrypt note title in the recent changes if in secure session, otherwise omit the change altogether --- static/js/recent_changes.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/js/recent_changes.js b/static/js/recent_changes.js index d13e6e514..15d61e3ac 100644 --- a/static/js/recent_changes.js +++ b/static/js/recent_changes.js @@ -12,6 +12,15 @@ $(document).bind('keydown', 'alt+r', function() { const groupedByDate = {}; for (const row of result) { + if (row.encryption > 0) { + if (!isEncryptionAvailable()) { + // we don't display encrypted note activity if we're not in the secure session + continue; + } + + row.note_title = decryptString(row.note_title); + } + const dateModified = new Date(row.date_modified * 1000); const formattedDate = formatDate(dateModified);