Uploaded image for project: 'GeoServer'
  1. GEOS-8727

(WMS) Layer Preview does not properly encode layer identifiers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.14-RC
    • Component/s: None
    • Labels:
      None

      Description

      The OGC (WMS) specifications follow "percent encoding" encoding practices for parameter arguments, with some specializations explicitly allowed across the entire specification.

      However, the Layer Preview page does not properly encode the layer identifier/name (and possible other arguments, like style, crs), causing a broken experience when trying to preview these layers.

      To reproduce this, simply re-publish the `World:World` layer data with a layer identifier/name that contains a plus, e.g. `World: World + with a plus`.

      geoserver_1     | 01 May 16:32:50 ERROR [geoserver.ows] - 
      geoserver_1     | org.geoserver.platform.ServiceException: Could not find layer World:World   with a plus
      geoserver_1     | 	at org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(GetMapKvpRequestReader.java:1150)
      geoserver_1     | 	at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:237)
      geoserver_1     | 	at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpRequestReader.java:87)
      geoserver_1     | 	at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java:1531)
      geoserver_1     | 	at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:690)
      geoserver_1     | 	at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:260)
      geoserver_1     | 	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174)
      geoserver_1     | 	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
      geoserver_1     | 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
      geoserver_1     | 	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      geoserver_1     | 	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      geoserver_1     | 	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
      geoserver_1     | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      geoserver_1     | 	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      geoserver_1     | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:458)
      geoserver_1     | 	at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:177)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
      geoserver_1     | 	at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
      geoserver_1     | 	at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
      geoserver_1     | 	at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      geoserver_1     | 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
      geoserver_1     | 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      geoserver_1     | 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      geoserver_1     | 	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
      geoserver_1     | 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:84)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
      geoserver_1     | 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
      geoserver_1     | 	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
      geoserver_1     | 	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
      geoserver_1     | 	at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:152)
      geoserver_1     | 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      geoserver_1     | 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:88)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:89)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
      geoserver_1     | 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      geoserver_1     | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      geoserver_1     | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      geoserver_1     | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
      geoserver_1     | 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
      geoserver_1     | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      geoserver_1     | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      geoserver_1     | 	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
      geoserver_1     | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      geoserver_1     | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
      geoserver_1     | 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
      geoserver_1     | 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
      geoserver_1     | 	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2527)
      geoserver_1     | 	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2516)
      geoserver_1     | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      geoserver_1     | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      geoserver_1     | 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      geoserver_1     | 	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              nathan.schulte Nathan Schulte
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: