This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-cc1143aa-ee08-4503-aaa5-793ce4c22fac XWIKI-23343 Open

Improve the error message displayed when attaching a file with an allowed Mimetype extension but its content doesn't match the allowed Mimetype

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-1a9b78cb-8f56-4fde-a0c4-d923dc5dcd79 Ilie Andriuta created this issue on 26/Jun/25 11:50
 
Summary: Improve the error message displayed when attaching a file with an allowed Mimetype extension but its content doesn't match the allowed Mimetype
Issue Type: cid:jira-generated-image-avatar-cc1143aa-ee08-4503-aaa5-793ce4c22fac Improvement
Affects Versions: 17.4.0
Assignee: Unassigned
Attachments: Generic_error_displayed.png, image_disguised_as_text_file.txt
Components: Attachments
Created: 26/Jun/25 11:50
Environment: Windows 11 Pro, Chrome 137, using an instance of XWiki 17.4.1 on PostgreSQL 17, Tomcat 11.0.8
Priority: cid:jira-generated-image-static-major-3a062489-b8cd-4a66-8b95-42d5b172e23c Major
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Login as Admin
  2. Go to Administer Wiki > Content > Attachments Restriction
  3. Under "Allowed Mimetypes", insert some file types to be allowed (e.g. text/plain)
  4. Under "Blocked Mimetypes", insert some file types to be restricted (e.g. image/*)
  5. Save
  6. Have an image file with an extension changed to .txt or use the one attached to this issue
  7. Login as an user
  8. Go to a page and upload this file
  9. Observe the received message

Expected results

An error message is displayed informing the user that the content of the file doesn't match the allowed file Mimetypes to be uploaded.

Actual results

A generic error message is displayed:

An error occurred while uploading <filename>.
 
 

1 update

 
cid:jira-generated-image-avatar-1a9b78cb-8f56-4fde-a0c4-d923dc5dcd79 Changes by Ilie Andriuta on 26/Jun/25 11:50
 
Labels: usability