fix decryption in stikkedizr. fixes #499

This commit is contained in:
Claude 2018-09-28 15:36:52 +02:00
parent c24e053f0e
commit d5ffd57956
4 changed files with 24 additions and 6 deletions

View File

@ -161,7 +161,7 @@ ST.crypto = function() {
} else {
try {
var $code = $('#code');
var encrypted = $code.val().replace(/\n/g, '');
var encrypted = $code.text().replace(/\n/g, '');
var decrypted = CryptoJS.AES.decrypt(encrypted, key).toString(CryptoJS.enc.Utf8) + '';
decrypted = LZString.decompressFromBase64(decrypted);
$code.val(decrypted);

View File

@ -7,6 +7,11 @@ if(isset($codemirror_modes)){
echo '<div style="display: none;" id="codemirror_modes">' . json_encode($codemirror_modes) . '</div>';
}
//ace modes
if(isset($ace_modes)){
echo '<div style="display: none;" id="ace_modes">' . json_encode($ace_modes) . '</div>';
}
//stats
$this->load->view('defaults/stats');
@ -16,9 +21,15 @@ $this->carabiner->js('jquery.timers.js');
$this->carabiner->js('crypto-js/rollups/aes.js');
$this->carabiner->js('lz-string-1.3.3-min.js');
$this->carabiner->js('filereader.js');
$this->carabiner->js('linkify.min.js');
$this->carabiner->js('linkify-jquery.min.js');
if(config_item('js_editor') == 'codemirror') {
$this->carabiner->js('codemirror/codemirror.js');
}
if(config_item('js_editor') == 'ace') {
$this->carabiner->js('ace/ace.js');
}
$this->carabiner->js('stikked.js');
$this->carabiner->js('codemirror/codemirror.js');
$this->carabiner->js('codemirror_exec.js');
$this->carabiner->display('js');

View File

@ -60,7 +60,7 @@ if(isset($insert)){
</div>
</div>
</section>
<section>
<section class="replies">
<?php
function checkNum($num){

View File

@ -18,9 +18,16 @@ $this->carabiner->js('jquery.timers.js');
$this->carabiner->js('crypto-js/rollups/aes.js');
$this->carabiner->js('lz-string-1.3.3-min.js');
$this->carabiner->js('filereader.js');
$this->carabiner->js('linkify.min.js');
$this->carabiner->js('linkify-jquery.min.js');
if(config_item('js_editor') == 'codemirror') {
$this->carabiner->js('codemirror/codemirror.js');
}
if(config_item('js_editor') == 'ace') {
$this->carabiner->js('ace/ace.js');
}
$this->carabiner->js('stikked.js');
$this->carabiner->js('codemirror/codemirror.js');
$this->carabiner->js('codemirror_exec.js');
$this->carabiner->display('js');
?>