Pad EXIF program string

This commit is contained in:
Jenga Phoenix 2019-01-27 00:13:49 -06:00
parent f37c5c0615
commit d665e7c4ac
2 changed files with 4 additions and 3 deletions

View File

@ -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);
}

View File

@ -1,6 +1,5 @@
<?php
// FILENAME --> 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;
}