diff options
author | Ilja <ilja@ilja.space> | 2022-07-01 12:31:34 +0200 |
---|---|---|
committer | Ilja <ilja@ilja.space> | 2022-07-01 13:47:23 +0200 |
commit | 56227ef7ba097c6be39a7e70b67c426a3016e0ab (patch) | |
tree | 44190d56621bf1b0272afee9564fee232649f0e2 /lib | |
parent | 8c761942b1963bff08d98eeb22b84b0f327d68e4 (diff) | |
download | pleroma-56227ef7ba097c6be39a7e70b67c426a3016e0ab.tar.gz pleroma-56227ef7ba097c6be39a7e70b67c426a3016e0ab.zip |
Descriptions from exif data with only whitespeces are considered empty
I noticed that pictures taken with Ubuntu-Touch have whitespace in one of the fields
This should just be ignored imo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/upload/filter/exiftool/read_description.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/upload/filter/exiftool/read_description.ex b/lib/pleroma/upload/filter/exiftool/read_description.ex index a69f79124..03d698a81 100644 --- a/lib/pleroma/upload/filter/exiftool/read_description.ex +++ b/lib/pleroma/upload/filter/exiftool/read_description.ex @@ -35,6 +35,8 @@ defmodule Pleroma.Upload.Filter.Exiftool.ReadDescription do {tag_content, 0} = System.cmd("exiftool", ["-b", "-s3", tag, file], stderr_to_stdout: true, parallelism: true) + tag_content = String.trim(tag_content) + if tag_content != "" and String.length(tag_content) <= Pleroma.Config.get([:instance, :description_limit]), |