Reload page when back button in browser pressed, avoid reading burn

after read paste from cache
pull/630/head
Haocen Xu 2020-05-30 05:57:27 -04:00
parent afcece17dd
commit e298c3d10c
No known key found for this signature in database
GPG Key ID: 3F0D955A0F6AD729
1 changed files with 4 additions and 0 deletions

View File

@ -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();