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

Server errors (bad escaping) when getting space suggestions for URL escape sequence %#

    Details

    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:
      1. Go to page creation http://localhost:8080/xwiki/bin/create/Main/WebHome
      2. Use for space name the string "%#" (no quotes)
      3. You will get a 'Server Error' error notification (see attachment) and the following stack trace in the console:

      Nov 01, 2014 3:35:54 AM org.restlet.ext.jaxrs.internal.util.ExceptionHandler methodInvokeException
      WARNING: Can not invoke the resource method
      java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
              at java.net.URLDecoder.decode(URLDecoder.java:187)
              at org.restlet.data.Reference.decode(Reference.java:150)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.convertParamValue(ParameterList.java:188)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.convertParamValue(ParameterList.java:168)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$FormOrQueryParamGetter.getParamValue(ParameterList.java:530)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$QueryParamGetter.getParamValue(ParameterList.java:773)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.getValue(ParameterList.java:420)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList.get(ParameterList.java:1094)
              at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:169)
              at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:291)
              at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:1043)
              at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:792)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
              at org.restlet.Application.handle(Application.java:391)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.Component.handle(Component.java:391)
              at org.restlet.Server.handle(Server.java:491)
              at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
              at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
              at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
              at org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:85)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:497)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
              at java.lang.Thread.run(Thread.java:745)
      
      org.restlet.ext.jaxrs.internal.exceptions.MethodInvokeException: Could not invoke public org.xwiki.rest.model.jaxb.SearchResults org.xwiki.rest.internal.resources.wikis.WikiSearchResourceImpl.search(java.lang.String,java.lang.String,java.util.List,java.lang.Integer,java.lang.Integer,java.lang.String,java.lang.String,java.lang.Boolean) throws org.xwiki.rest.XWikiRestException
              at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:293)
              at org.restlet.ext.jaxrs.JaxRsRestlet.invokeMethod(JaxRsRestlet.java:1043)
              at org.restlet.ext.jaxrs.JaxRsRestlet.handle(JaxRsRestlet.java:792)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75)
              at org.restlet.Application.handle(Application.java:391)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.routing.Router.doHandle(Router.java:500)
              at org.restlet.routing.Router.handle(Router.java:740)
              at org.restlet.routing.Filter.doHandle(Filter.java:159)
              at org.restlet.routing.Filter.handle(Filter.java:206)
              at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114)
              at org.restlet.Component.handle(Component.java:391)
              at org.restlet.Server.handle(Server.java:491)
              at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74)
              at org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153)
              at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:769)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1667)
              at org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:85)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:497)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: URLDecoder: Incomplete trailing escape (%) pattern
              at java.net.URLDecoder.decode(URLDecoder.java:187)
              at org.restlet.data.Reference.decode(Reference.java:150)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.convertParamValue(ParameterList.java:188)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.convertParamValue(ParameterList.java:168)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$FormOrQueryParamGetter.getParamValue(ParameterList.java:530)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$QueryParamGetter.getParamValue(ParameterList.java:773)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$AbstractParamGetter.getValue(ParameterList.java:420)
              at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList.get(ParameterList.java:1094)
              at org.restlet.ext.jaxrs.internal.wrappers.AbstractMethodWrapper.internalInvoke(AbstractMethodWrapper.java:169)
              at org.restlet.ext.jaxrs.internal.wrappers.ResourceMethod.invoke(ResourceMethod.java:291)
              ... 70 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                enygma Eduard Moraru
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: