aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaude <longneck@scratchbook.ch>2019-11-24 15:17:59 +0100
committerClaude <longneck@scratchbook.ch>2019-11-24 15:17:59 +0100
commit8d61ba5c6014534b64bee20c7c24ab1b72d8ea8f (patch)
tree2a9206ef9ff5f4420a5dea069b1479fba9780f68
parent897338689e705734e43e22b5bd12d43370fb93bc (diff)
downloadstikked-fit-8d61ba5c6014534b64bee20c7c24ab1b72d8ea8f.tar.gz
stikked-fit-8d61ba5c6014534b64bee20c7c24ab1b72d8ea8f.tar.bz2
stikked-fit-8d61ba5c6014534b64bee20c7c24ab1b72d8ea8f.zip
fix split url with burn on read + encrypted paste
ugly hack, fixes #518
-rw-r--r--htdocs/application/models/Pastes.php2
-rw-r--r--htdocs/themes/default/js/stikked.js4
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 '<!DOCTYPE html><html><head><title>Warning!</title></head><body>';
echo '<pre>Copy this URL:</pre>';
- echo '<span style="background-color: black; color: white">' . site_url('view/' . $data['pid']) . "</span>\n";
+ echo '<input type="text" style="background-color: black; color: white; margin: 0; width: 42em;" value="' . site_url('view/' . $data['pid']) . '" /><!-- behind you --><br /><br />';
if ($data['snipurl'] !== false) {
echo '<br>Shorturl: ' . $shorturl . '">' . $shorturl . '<br>';
}
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('<div class="message error"><div class="container">The captcha is incorrect.</div></div>');
} else if (redirect_url.indexOf('invalid') > -1) {
- $('#create_encrypted').parent().html('<p>' + redirect_url + '#' + key + '</p>');
+ // burn on read
+ redirect_url = redirect_url.replace('" /><!-- behind you -->', '#' + key + '" />')
+ $('#create_encrypted').parent().html('<p>' + redirect_url + '</p>');
} else {
window.location.href = base_url + redirect_url + '#' + key;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy