diff --git a/public_html/private/beam.php b/public_html/private/beam.php index f8eb03e..525de88 100644 --- a/public_html/private/beam.php +++ b/public_html/private/beam.php @@ -30,7 +30,7 @@ switch (true) { case (move_uploaded_file($_FILES["uploadcoin"]["tmp_name"], $dest_file) && write_metadata($dest_file, $_POST["file_source"])): - if (in_array(file_extension($dest_file)),array("jpg","jpeg")) { + if (in_array(file_extension($dest_file),array("jpg","jpeg"))) { sanitize_image($dest_file); } diff --git a/resources/library/sanitization.php b/resources/library/sanitization.php index 2214880..20927d3 100644 --- a/resources/library/sanitization.php +++ b/resources/library/sanitization.php @@ -1,6 +1,5 @@ SAFE_FILENAME_STRING // Sanitize a filename by replacing common suspicious characters with "_". function sanitize_filename($filename) @@ -22,7 +21,9 @@ function sanitize_filename($filename) // Sanitize an image (EXIF, etc) with external program from config.php function sanitize_image($path) { - exec($image_sanitize_command . $image_sanitize_args . $path, $result); + exec($GLOBALS['image_sanitize_command'] . ' ' + . $GLOBALS['image_sanitize_args'] . ' ' + . $path, $result); return $path; }