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

Malformed URLs should not throw exceptions, but report an error

    XMLWordPrintable

Details

    Description

      For example, something like http://localhost:8080/xwiki/bin/view/Photos/url=http://www.spam-attempt.com/some/lame/spam-attempt/ should display something similar to docdoesnotexist, instead of showing an ugly page with (shown only important part of the exception):

      java.lang.StringIndexOutOfBoundsException: String index out of range: -10
      	at java.lang.String.substring(String.java:1768)
      	at com.xpn.xwiki.doc.XWikiDocument.setFullName(XWikiDocument.java:3023)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1145)
      	at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:4167)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:138)
      

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              sdumitriu Sergiu Dumitriu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: