assets/js/ticket.js (~line 1050), renderAttachments() computes isImage via a regex against att.original_filename rather than checking att.mime_type, which the API already returns and which reflects the real, finfo-verified type set at upload time (per models/AttachmentModel.php).
Impact: A file whose true type differs from its display filename (e.g. a PDF a user named photo.png — the server correctly stores it as a PDF but preserves the original display name) renders a broken <img> thumbnail instead of falling back to the file-type icon.
Fix: Use att.mime_type (already returned by the API) to decide whether to render an image thumbnail, instead of pattern-matching the filename.
**Severity:** Low (cosmetic, not exploitable)
`assets/js/ticket.js` (~line 1050), `renderAttachments()` computes `isImage` via a regex against `att.original_filename` rather than checking `att.mime_type`, which the API already returns and which reflects the real, `finfo`-verified type set at upload time (per `models/AttachmentModel.php`).
**Impact:** A file whose true type differs from its display filename (e.g. a PDF a user named `photo.png` — the server correctly stores it as a PDF but preserves the original display name) renders a broken `<img>` thumbnail instead of falling back to the file-type icon.
**Fix:** Use `att.mime_type` (already returned by the API) to decide whether to render an image thumbnail, instead of pattern-matching the filename.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: Low (cosmetic, not exploitable)
assets/js/ticket.js(~line 1050),renderAttachments()computesisImagevia a regex againstatt.original_filenamerather than checkingatt.mime_type, which the API already returns and which reflects the real,finfo-verified type set at upload time (permodels/AttachmentModel.php).Impact: A file whose true type differs from its display filename (e.g. a PDF a user named
photo.png— the server correctly stores it as a PDF but preserves the original display name) renders a broken<img>thumbnail instead of falling back to the file-type icon.Fix: Use
att.mime_type(already returned by the API) to decide whether to render an image thumbnail, instead of pattern-matching the filename.