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

Malformed REST URL for page containing a slash

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      When saving documents whose title contains a / character I get an exception that a rest call is unsuccessful due to a malformed URL. Apparently, after saving a document the content is being refreshed again through a rest api call, hence, it is doesn't seem to be too much of an issue for now but some users have reported that the editor - when clicking save + view does not redirect to viewing the page but only saves it.

      Here is the stacktrace

       

      org.xwiki.rest.XWikiRestException: Malformed URL: the spaces section is invalid.
      at org.xwiki.rest.XWikiResource.parseSpaceSegments(XWikiResource.java:170)
      at org.xwiki.rest.XWikiResource.getDocumentInfo(XWikiResource.java:214)
      at org.xwiki.rest.internal.resources.pages.PageResourceImpl.getPage(PageResourceImpl.java:47)
      at sun.reflect.GeneratedMethodAccessor1108.invoke()
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:162)
      at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:281)
      at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:997)
      at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:746)
      at org.restlet.routing.Filter.doHandle(Filter.java:150)
      

      The title of the page is 'Bug with / in title'

       

      Probably there needs to be some escaping of the URL.

       

      A quick sidenote - thanks for pointing out glowroot as a tool. It is awesome to identify errors more easily!

      If I can be of any help let me know

       

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              zonradkuse Johannes Neuhaus
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: