mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-05-02 14:36:08 -04:00
ensure burn after reading and status messages are only changed after a successfull decryption
This commit is contained in:
parent
9deaed9406
commit
ee43557a4f
3 changed files with 14 additions and 15 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue