1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 23:56:58 +02:00

Fix for upload errors affecting non-main admins.

This commit is contained in:
Cameron
2013-11-06 15:28:50 -08:00
parent 6725cb4ffe
commit ba192508b7
2 changed files with 6 additions and 2 deletions

View File

@@ -11,7 +11,9 @@
// HTTP headers for no cache etc
$_E107['no_online'] = true;
define('e_MINIMAL', true);
define('FLOODPROTECT', false);
require_once("../../../class2.php");
if(!ADMIN)
@@ -44,6 +46,8 @@ $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0;
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0;
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
// Clean the fileName for security reasons
$fileName = preg_replace('/[^\w\._]+/', '_', $fileName);