ensure burn after reading and status messages are only changed after a successfull decryption

This commit is contained in:
El RIDO 2017-03-13 19:30:44 +01:00
parent 9deaed9406
commit ee43557a4f
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
3 changed files with 14 additions and 15 deletions

View File

@ -3764,26 +3764,25 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
} else {
decryptPaste(paste, key, password);
}
// shows the remaining time (until) deletion
PasteStatus.showRemainingTime(paste.meta);
// if the discussion is opened on this paste, display it
if (paste.meta.opendiscussion) {
decryptComments(paste, key, password);
}
Alert.hideLoading();
TopNav.showViewButtons();
} catch(err) {
Alert.hideLoading();
// log and show error
console.error(err);
Alert.showError('Could not decrypt data (Wrong key?)');
// still go on to potentially show potentially partially decrypted data
}
// shows the remaining time (until) deletion
PasteStatus.showRemainingTime(paste.meta);
// if the discussion is opened on this paste, display it
if (paste.meta.opendiscussion) {
decryptComments(paste, key, password);
}
Alert.hideLoading();
TopNav.showViewButtons();
}
/**

View File

@ -69,7 +69,7 @@ if ($MARKDOWN):
<?php
endif;
?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYpK88nUEIgIruOud+YW0LKt+V+PVZZ1OEuO6SF49Yo6Dl0q/DCjJlHQ+RhSgkuexdSnpE9+ira9GJ1wih+e5A==" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-hGJxoiUhU8ByJ5Q8QsnfUzrb202C8og2STIg8P/y+ZgEo7zUOZSSRvH9JT6p9TnEmgulqaLOZ16sQBBpLaTdpQ==" crossorigin="anonymous"></script>
<!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]-->

View File

@ -47,7 +47,7 @@ if ($MARKDOWN):
<?php
endif;
?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYpK88nUEIgIruOud+YW0LKt+V+PVZZ1OEuO6SF49Yo6Dl0q/DCjJlHQ+RhSgkuexdSnpE9+ira9GJ1wih+e5A==" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-hGJxoiUhU8ByJ5Q8QsnfUzrb202C8og2STIg8P/y+ZgEo7zUOZSSRvH9JT6p9TnEmgulqaLOZ16sQBBpLaTdpQ==" crossorigin="anonymous"></script>
<!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]-->