fix split url with burn on read + encrypted paste

ugly hack, fixes #518
This commit is contained in:
Claude 2019-11-24 15:17:59 +01:00
parent 897338689e
commit 8d61ba5c60
2 changed files with 4 additions and 2 deletions

View File

@ -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>';
}

View File

@ -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;
}