diff --git a/packages/web/lib/fog/fogbase.class.php b/packages/web/lib/fog/fogbase.class.php index 548b6b14a7..18bc11426e 100644 --- a/packages/web/lib/fog/fogbase.class.php +++ b/packages/web/lib/fog/fogbase.class.php @@ -2302,11 +2302,8 @@ public static function lasterror() */ public static function getFilesize($file) { - $file = escapeshellarg($file); - - return trim( - shell_exec("du -b $file | awk '{print $1}'") - ); + $size = filesize($file); + return isset($size) ? $size : 0; } /** * Perform enmass wake on lan. @@ -2420,7 +2417,6 @@ public static function fastmerge($array1) */ public static function getHash($file) { - $file = escapeshellarg($file); $filesize = self::getFilesize($file); $fp = fopen($file, 'r'); if ($fp) {