From e298c3d10c9254b0677eb1f9618ca395b5e9ecc1 Mon Sep 17 00:00:00 2001 From: Haocen Xu Date: Sat, 30 May 2020 05:57:27 -0400 Subject: [PATCH] Reload page when back button in browser pressed, avoid reading burn after read paste from cache --- js/privatebin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/privatebin.js b/js/privatebin.js index d80ae75..98d9c9a 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -5386,6 +5386,10 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (Model.hasDeleteToken()) { return; } + // always reload on back button to invalidate cache(protect burn after read paste) + window.addEventListener('popstate', () => { + window.location.reload(); + }); // display an existing paste return me.showPaste();