Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20442

Attachment restriction configuration can get outdated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.0-rc-1, 14.10.1
    • 14.10
    • Attachments
    • None
    • Windows 11 Pro 64 bit, Firefox 107, using a local instance of XWiki 14.10 on PostgreSQL 15, Tomcat 9.0.69
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE
       # Login as Admin
       # Go to Administer Wiki > Content > Attachments Restriction
       # Set a restriction on Allowed Mimetypes for ex: text/plain,image/*
       # Go to a page
       # Upload a non-image, non-text file (e.g. a PDF)
       # Observe the message in the red rectangle on the bottom of the page
       # Remove the restriction set previously from Administration
       # On a page, go to Administer Page > Content > Attachments Restriction
       # Set a restriction on Allowed Mimetypes for ex: text/plain,image/*
       # Upload a non-image, non-text file (e.g. a PDF)
       # Observe the message in the red rectangle on the bottom of the page

      EXPECTED RESULTS

      The message generated when the Attachments restricted mimetypes are set at Wiki level (from Administration) is the same with the message generated when the Attachments restricted mimetypes are set at Page level (from Administer Page), explaining that the uploaded file has an invalid mimetype and what are the allowed mimetypes.

      ACTUAL RESULTS

      The message generated when the Attachments restricted mimetypes are set at Page level is a generic error message:

      An error occurred while uploading FileName.txt

      No other info is provided to the user why the file wasn't uploaded and/or if other type of files are allowed.

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: