burn after reading only

Signed-off-by: Tobias Gurtzick <magic@wizardtales.com>
This commit is contained in:
Tobias Gurtzick 2024-01-08 12:38:48 +01:00
parent 8516a3f4a4
commit 2a508cb7bf
No known key found for this signature in database
GPG Key ID: 6C56E4E3D2EAC901

View File

@ -4862,7 +4862,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
const pw = TopNav.getPassword() const pw = TopNav.getPassword()
if(pw && pw.length) { // only execute when it is a single time view
if(pw && pw.length && TopNav.getBurnAfterReading()) {
const sm = CryptTool.getSymmetricKey(); const sm = CryptTool.getSymmetricKey();
@ -5032,9 +5033,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
// prepare server interaction // prepare server interaction
ServerInteraction.prepare(); ServerInteraction.prepare();
// This is not needed when encrypting browser side if(!TopNav.getBurnAfterReading()) {
// ServerInteraction.setCryptParameters(TopNav.getPassword()); ServerInteraction.setCryptParameters(TopNav.getPassword());
ServerInteraction.setCryptParameters(''); } else {
// not needed in this scenario
ServerInteraction.setCryptParameters('');
}
// set success/fail functions // set success/fail functions
ServerInteraction.setSuccess(showCreatedPaste); ServerInteraction.setSuccess(showCreatedPaste);