if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)\r
{\r
require (JIRAFEAU_ROOT . 'lib/template/header.php');\r
- check_errors ();\r
+ check_errors ($cfg);\r
if (has_error ())\r
{\r
show_errors ();\r
/* Lets use interface now. */\r
header('Content-Type: text; charset=utf-8');\r
\r
-check_errors ();\r
+check_errors ($cfg);\r
if (has_error ())\r
{\r
echo "Error";\r
if (isset ($_FILES['file']) && is_writable (VAR_FILES)\r
&& is_writable (VAR_LINKS))\r
{\r
+ if (strlen ($cfg['upload_password']) > 0 && (!isset ($_POST['upload_password']) || $_POST['upload_password'] != $cfg['upload_password']))\r
+ {\r
+ echo "Error";\r
+ exit;\r
+ }\r
+\r
$key = '';\r
if (isset ($_POST['key']))\r
$key = $_POST['key'];\r
/* Initialize an asynchronous upload. */\r
elseif (isset ($_GET['init_async']))\r
{\r
+ if (strlen ($cfg['upload_password']) > 0 && (!isset ($_POST['upload_password']) || $_POST['upload_password'] != $cfg['upload_password']))\r
+ {\r
+ echo "Error";\r
+ exit;\r
+ }\r
+\r
if (!isset ($_POST['filename']))\r
{\r
echo "Error";\r
/* Initialize block. */\r
elseif (isset ($_GET['init_block']) && $cfg['enable_blocks'])\r
{\r
+ if (strlen ($cfg['upload_password']) > 0 && (!isset ($_POST['upload_password']) || $_POST['upload_password'] != $cfg['upload_password']))\r
+ {\r
+ echo "Error";\r
+ exit;\r
+ }\r
+\r
if (!isset ($_POST['size']))\r
echo "Error";\r
else\r