mojira / arisa-kt

:robot::sparkles: Run checks and perform automated tasks in Mojira
https://bugs.mojang.com
GNU General Public License v3.0
10 stars 6 forks source link

Arisa sometimes fails to thumbnail large images #818

Open Dhranios opened 11 months ago

Dhranios commented 11 months ago

The Bug

Arisa is intended to add |thumbnail to large image files, however sometimes this is skipped.

Example Ticket/comments

https://bugs.mojang.com/browse/MC-266941 (it did the last one, not the first 2 https://bugs.mojang.com/browse/MC-252942?focusedId=1290184&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1290184 (edited by mod afterward, also now hidden/deleted(I took the link from a past request of mine)) https://bugs.mojang.com/browse/MC-189332?focusedId=1268825&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1268825 (edited by mod afterward)

Expected behavior

Make all images above a certain size thumbnails.

Marcono1234 commented 10 months ago

Thanks for reporting this!

For MC-266941 the reason is probably that the image reference is enclosed by *: *!2023-11-22_14.08.48.png!* Currently the Arisa module is a bit strict when trying to detect image references, to reduce false positives.

However, I assume the logic could be refactored to first look at all the attachments of the issue, and then search for references in the form !name!, which would be less strict and probably more accurate. But maybe the attachment name should probably still be validated to avoid malicious users uploading images with sentences or similar as name, causing Arisa to corrupt the description of issues (?).

For the comments you mentioned I unfortunately don't know what was causing this.