From 8d61ba5c6014534b64bee20c7c24ab1b72d8ea8f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 24 Nov 2019 15:17:59 +0100 Subject: fix split url with burn on read + encrypted paste ugly hack, fixes #518 --- htdocs/application/models/Pastes.php | 2 +- htdocs/themes/default/js/stikked.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/application/models/Pastes.php b/htdocs/application/models/Pastes.php index ce52f91..1b181c4 100644 --- a/htdocs/application/models/Pastes.php +++ b/htdocs/application/models/Pastes.php @@ -104,7 +104,7 @@ class Pastes extends CI_Model $CItemp = &get_instance(); echo 'Warning!'; echo '
Copy this URL:
'; - echo '' . site_url('view/' . $data['pid']) . "\n"; + echo '

'; if ($data['snipurl'] !== false) { echo '
Shorturl: ' . $shorturl . '">' . $shorturl . '
'; } diff --git a/htdocs/themes/default/js/stikked.js b/htdocs/themes/default/js/stikked.js index 9448f24..7342905 100644 --- a/htdocs/themes/default/js/stikked.js +++ b/htdocs/themes/default/js/stikked.js @@ -181,7 +181,9 @@ ST.crypto = function () { $('.content .container .message').remove(); $('.content .container').prepend('
The captcha is incorrect.
'); } else if (redirect_url.indexOf('invalid') > -1) { - $('#create_encrypted').parent().html('

' + redirect_url + '#' + key + '

'); + // burn on read + redirect_url = redirect_url.replace('" />', '#' + key + '" />') + $('#create_encrypted').parent().html('

' + redirect_url + '

'); } else { window.location.href = base_url + redirect_url + '#' + key; } -- cgit v1.2.3