take out authentication and secure script with a token

This commit is contained in:
Uwe Steinmann 2020-08-26 11:40:04 +02:00
parent 92b049ee6d
commit 6d881fed60
2 changed files with 7 additions and 5 deletions

View File

@ -26,11 +26,13 @@ include("../inc/inc.Init.php");
include("../inc/inc.Extension.php");
include("../inc/inc.DBInit.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.Authentication.php");
//include("../inc/inc.Authentication.php");
//print_r($_FILES);
//print_r($_POST);
//exit;
if(empty($_GET['formkey']) || $_GET['formkey'] != md5($settings->_encryptionKey.'uploadchunks')) {
header("Content-Type: text/plain");
echo json_encode(array('success'=>false, 'error'=>'Wrong formkey'));
exit;
}
$file_param_name = 'qqfile';
$file_name = $_FILES[ $file_param_name ][ 'name' ];

View File

@ -2752,7 +2752,7 @@ $(document).ready(function() {
element: $('#<?php echo $prefix; ?>-fine-uploader')[0],
template: 'qq-template',
request: {
endpoint: '<?php echo $uploadurl; ?>'
endpoint: '<?php echo $uploadurl."?formkey=".md5($this->params['settings']->_encryptionKey.'uploadchunks'); ?>'
},
<?php echo ($maxuploadsize > 0 ? '
validation: {