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

Client side mimetype restriction check does not take into account the right document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.0-rc-1, 14.10.2
    • 14.10
    • CKEditor
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Following the same steps as XWIKI-20367:

      • Create a page Test.XClass.WebHome containing a textarea property named "test" that uses WYSIWYG editor and Wiki Syntax
      • Create a page Test.XObj.WebHome containing an xobject of type XClass previously created
      • Create a page Test.Test containing the following piece of code:
        {{velocity}}
        #set ($myDoc = $xwiki.getDocument('Test.XObj.WebHome'))
        #set ($myObj = $myDoc.getObject('Test.XClass.WebHome'))
        $myObj.display('test', 'edit')
        {{/velocity}} 

      Then add attachments mimetypes restrictions:

      • allow image/* on XObj
      • allow text/plain on Test

      Upload an image usage the image dialog.

      Expected:

      • The image upload is accepts

      Actual:

      • The image upload is reject since the attachment restriction of the Test page are used instead of XObject

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: