From: Mark Felder Date: Fri, 4 Sep 2020 22:50:16 +0000 (-0500) Subject: Verify webp files are not processed with exiftool X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3a98960c2684229435c5d04e4f3e0611098ceea2;p=akkoma Verify webp files are not processed with exiftool --- diff --git a/test/upload/filter/exiftool_test.exs b/test/upload/filter/exiftool_test.exs index 094253a25..fe24036d9 100644 --- a/test/upload/filter/exiftool_test.exs +++ b/test/upload/filter/exiftool_test.exs @@ -30,4 +30,15 @@ defmodule Pleroma.Upload.Filter.ExiftoolTest do assert String.match?(exif_original, ~r/GPS/) refute String.match?(exif_filtered, ~r/GPS/) end + + test "verify webp files are skipped" do + upload = %Pleroma.Upload{ + name: "sample.webp", + content_type: "image/webp", + path: Path.absname("/dev/null"), + tempfile: Path.absname("/dev/null") + } + + assert Filter.Exiftool.filter(upload) == {:ok, :noop} + end end