mirror of
https://github.com/e107inc/e107.git
synced 2025-06-06 19:06:39 +02:00
Fix for upload errors affecting non-main admins.
This commit is contained in:
parent
6725cb4ffe
commit
ba192508b7
@ -1188,7 +1188,7 @@ if ($pref['anon_post'] ? define('ANON', true) : define('ANON', false));
|
|||||||
|
|
||||||
if (empty($pref['newsposts']) ? define('ITEMVIEW', 15) : define('ITEMVIEW', $pref['newsposts']));
|
if (empty($pref['newsposts']) ? define('ITEMVIEW', 15) : define('ITEMVIEW', $pref['newsposts']));
|
||||||
|
|
||||||
if ($pref['antiflood1'] == 1)
|
if ($pref['antiflood1'] == 1 && !defined('FLOODPROTECT'))
|
||||||
{
|
{
|
||||||
define('FLOODPROTECT', TRUE);
|
define('FLOODPROTECT', TRUE);
|
||||||
define('FLOODTIMEOUT', max(varset($pref['antiflood_timeout'], 10), 3));
|
define('FLOODTIMEOUT', max(varset($pref['antiflood_timeout'], 10), 3));
|
||||||
|
@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
// HTTP headers for no cache etc
|
// HTTP headers for no cache etc
|
||||||
|
|
||||||
|
$_E107['no_online'] = true;
|
||||||
|
define('e_MINIMAL', true);
|
||||||
|
define('FLOODPROTECT', false);
|
||||||
require_once("../../../class2.php");
|
require_once("../../../class2.php");
|
||||||
|
|
||||||
if(!ADMIN)
|
if(!ADMIN)
|
||||||
@ -44,6 +46,8 @@ $chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0;
|
|||||||
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0;
|
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0;
|
||||||
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Clean the fileName for security reasons
|
// Clean the fileName for security reasons
|
||||||
$fileName = preg_replace('/[^\w\._]+/', '_', $fileName);
|
$fileName = preg_replace('/[^\w\._]+/', '_', $fileName);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user