From 6d4fb532062c3c09187c81ef8af5f5b638ca4414 Mon Sep 17 00:00:00 2001 From: Lain Soykaf Date: Fri, 28 Jun 2024 21:59:00 +0400 Subject: [PATCH] StripLocation: Remove all PNG extra info to make sure that GPS data is gone. --- lib/pleroma/upload/filter/exiftool/strip_location.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/upload/filter/exiftool/strip_location.ex b/lib/pleroma/upload/filter/exiftool/strip_location.ex index 8becee712..1744a286d 100644 --- a/lib/pleroma/upload/filter/exiftool/strip_location.ex +++ b/lib/pleroma/upload/filter/exiftool/strip_location.ex @@ -16,7 +16,9 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripLocation do def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do try do - case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true) do + case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", "-png:all=", file], + parallelism: true + ) do {_response, 0} -> {:ok, :filtered} {error, 1} -> {:error, error} end