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

Making a request for a deleted attachment with a wrong rid from a created page causes NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 15.0-rc-1
    • Old Core
    • None
    • Windows 11 Pro, Edge 109, using a local instance of XWiki 15.0 on MariaDB 10.6, Tomcat 9.0.71
    • Unknown

    Description

      STEPS TO REPRODUCE

      1. Create a page (e.g. on root, named TestPage)
      2. Upload a file and then delete it
      3. Make a request for it from the recycle bin using a non-existent rid parameter in the query string (ex: /xwiki/bin/downloadrev/TestPage/yourfile.jpg?rev=1.1&rid=144)

      EXPECTED RESULTS

      An error is displayed informing that the respective attachment does not exist.

      ACTUAL RESULTS

      A NullPointerException is displayed.

      However, if the file is uploaded inside Sandbox Application pages (e.g. Sandbox.WebHome or Sandbox.TestPage1) the correct error is displayed.

      Attachments

        1. Calling_Sandbox.png
          43 kB
          Ilie Andriuta
        2. Calling_TestPage_NPE.png
          136 kB
          Ilie Andriuta

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: