\r
define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/');\r
\r
-require (JIRAFEAU_ROOT . 'lib/config.php');\r
+require (JIRAFEAU_ROOT . 'lib/config.original.php');\r
require (JIRAFEAU_ROOT . 'lib/settings.php');\r
require (JIRAFEAU_ROOT . 'lib/functions.php');\r
require (JIRAFEAU_ROOT . 'lib/lang.php');\r
/* Operations may take a long time.\r
* Be sure PHP's safe mode is off.\r
*/\r
- set_time_limit(0);\r
+@set_time_limit(0);\r
+/* Remove errors. */\r
+@error_reporting(0);\r
\r
if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0)\r
{\r
}\r
$res = jirafeau_upload ($_FILES['file'],\r
isset ($_POST['one_time_download']),\r
- $key, $time, $_SERVER['REMOTE_ADDR']);\r
+ $key, $time, $_SERVER['REMOTE_ADDR'],\r
+ $cfg['enable_crypt'], $cfg['link_name_lenght']);\r
\r
if (empty($res) || $res['error']['has_error'])\r
{\r
}\r
/* Print direct link. */\r
echo $res['link'];\r
- echo NL;\r
/* Print delete link. */\r
+ echo NL;\r
echo $res['delete_link'];\r
+ /* Print decrypt key. */\r
+ echo NL;\r
+ echo urlencode($res['crypt_key']);\r
}\r
elseif (isset ($_GET['h']))\r
{\r
if (isset ($_GET['d']))\r
$d = $_GET['d'];\r
\r
- if (!preg_match ('/[0-9a-zA-Z_-]{22}$/', $link_name))\r
+ if (!preg_match ('/[0-9a-zA-Z_-]+$/', $link_name))\r
{\r
echo "Error";\r
exit;\r
|| !isset ($_POST['code']))\r
echo "Error";\r
else\r
- echo jirafeau_async_end ($_POST['ref'], $_POST['code']);\r
+ echo jirafeau_async_end ($_POST['ref'], $_POST['code'], $cfg['enable_crypt'], $cfg['link_name_lenght']);\r
}\r
/* Initialize block. */\r
elseif (isset ($_GET['init_block']) && $cfg['enable_blocks'])\r