From 166d9f46c06e7367ec3665395cf26d3b4bac2c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Fri, 25 Apr 2014 15:22:46 +0300 Subject: [PATCH] If sandbox link file does not exist, return an error --- html/inc/sandbox.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/inc/sandbox.inc b/html/inc/sandbox.inc index 21784a8cde..4b94656816 100644 --- a/html/inc/sandbox.inc +++ b/html/inc/sandbox.inc @@ -65,6 +65,7 @@ function sandbox_lf_exist($user, $md5) { // parse a link file and return (error, size, md5) // function sandbox_parse_link_file($path) { + if (!file_exists($path)) { return array(true, null, null); } $x = file_get_contents($path); $n = sscanf($x, "%s %d %s", $s, $size, $md5); if ($n != 3) return array(true, null, null); @@ -110,7 +111,7 @@ function sandbox_file_select($user, $select_name, $regexp = null, $allow_none = } $x = "