commit: 6d4fb532062c3c09187c81ef8af5f5b638ca4414
parent ba88c5078a9828bbd743ed5a1d20bab7a69aa48e
Author: Lain Soykaf <lain@lain.com>
Date: Fri, 28 Jun 2024 21:59:00 +0400
StripLocation: Remove all PNG extra info to make sure that GPS data is gone.
Diffstat:
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
@@ -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