Pad EXIF program string
This commit is contained in:
parent
f37c5c0615
commit
d665e7c4ac
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Ŝarĝante…
Reference in New Issue