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

Bad error handling during file upload

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 2.3.2, 2.4.4, 2.7 RC1
    • Old Core
    • None
    • Any
    • Unknown

    Description

      During file upload, if an error occurs (other than the too large file, a disk full problem for example) that cause the 'fileupload' context variable not to be set properly, the error is not properly catch and we get:

      Error number 0 in 11: Uncaught exception
      
      Wrapped Exception: null
      com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
      Wrapped Exception: null
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:239)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
      
      
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      ...
      Wrapped Exception:
      
      java.lang.NullPointerException
      	at com.xpn.xwiki.web.UploadAction.action(UploadAction.java:92)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
      ...
      

      Error catching should not be limited to XWikiException.ERROR_XWIKI_APP_FILE_EXCEPTION_MAXSIZE and other possible error should be properly reported.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: