Added EXIF data-stripping for JPEG files

This commit is contained in:
Jenga Phoenix 2019-01-26 23:55:01 -06:00
parent 07cb4922e9
commit bdf52d0191
2 changed files with 9 additions and 2 deletions

View File

@ -21,12 +21,19 @@ switch (true) {
case (empty($file_name) || empty($dest_name)):
redirect(make_url("result/beam.php?error=1"));
break;
case (file_exists($dest_file)):
redirect(make_url("result/beam.php?error=2"));
break;
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")) {
sanitize_image($dest_file);
}
redirect(make_url("result/beam.php?success="
. $file_name));
break;

View File

@ -41,7 +41,7 @@ $file_beam_dir = "p/"; // where the files go
// for sanitization of images (stripping EXIF, etc) with an external program.
$image_sanitize_command = "mogrify";
$image_sanitize_args = "strip";
$image_sanitize_command = "jhead";
$image_sanitize_args = "-purejpg";
?>