From cd5df708fc10abb53d53436cff27e234347ffcce Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Mon, 29 Jul 2013 20:54:48 +0000 Subject: [PATCH] Hotfix for link name length --- lib/functions.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index f1c1d77..278b11c 100755 --- a/lib/functions.php +++ b/lib/functions.php @@ -317,6 +317,8 @@ jirafeau_delete_file ($md5) function jirafeau_upload ($file, $one_time_download, $key, $time, $ip, $crypt, $link_name_length) { + if (!is_int ($link_name_length)) + $link_name_length = 8; if (empty ($file['tmp_name']) || !is_uploaded_file ($file['tmp_name'])) { return (array( @@ -422,10 +424,10 @@ jirafeau_upload ($file, $one_time_download, $key, $time, $ip, $crypt, $link_name 'link' =>'', 'delete_link' => '')); } - return (array ('error' => $noerr, - 'link' => $md5_link, - 'delete_link' => $delete_link_code, - 'crypt_key' => $crypt_key)); + return (array ('error' => $noerr, + 'link' => $md5_link, + 'delete_link' => $delete_link_code, + 'crypt_key' => $crypt_key)); } /** @@ -890,6 +892,8 @@ jirafeau_async_push ($ref, $data, $code) function jirafeau_async_end ($ref, $code, $crypt, $link_name_length) { + if (!is_int ($link_name_length)) + $link_name_length = 8; /* Get async infos. */ $a = jirafeau_get_async_ref ($ref); if (count ($a) == 0 -- 2.34.1