Artifactory Binary Repository
  1. Artifactory Binary Repository
  2. RTFACT-4767

List browser returns an empty response for repo1 and repo

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.1
    • Component/s: None
    • Labels:
      None

      Description

      Simple browsing with no prefix yields an empty page:
      With 2.4.2 (Wicket 1.4.10):
      http://repo-demo.jfrog.org/artifactory/repo1/
      with 2.5.0 (Wicket 1.5.3):
      http://repo.jfrog.org/artifactory/repo1/

      No error outputted in the log.
      Reproducible locally.

        Activity

        Hide
        Yoav Landman
        added a comment - - edited

        Looks like a wicket bug caused by assuming the wicket filter value ("webapp") is part of the forwarded URI (which doesn't contain "webapp"). So this will happen for any repo whose name is shorter than "webapp".
        The exception is swallowed.

        java.lang.StringIndexOutOfBoundsException: String index out of range: -2
        	at java.lang.String.substring(String.java:1937)
        	at java.lang.String.substring(String.java:1904)
        	at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:180)
        	at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getClientUrl(ServletWebRequest.java:140)
        	at org.apache.wicket.request.UrlRenderer.<init>(UrlRenderer.java:59)
        	at org.apache.wicket.request.cycle.RequestCycle.newUrlRenderer(RequestCycle.java:145)
        	at org.apache.wicket.request.cycle.RequestCycle.getUrlRenderer(RequestCycle.java:169)
        	at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:145)
        	at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
        	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
        	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
        	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
        	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
        	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
        	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
        	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:148)
        	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:85)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:276)
        	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:185)
        	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:147)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:55)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:68)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:424)
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
        	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)
        	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
        	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)
        	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
        	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
        	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867)
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:346)
        	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:115)
        	at org.artifactory.webapp.servlet.RepoFilter.doRepoListing(RepoFilter.java:258)
        	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:122)
        	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:85)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:276)
        	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:185)
        	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:147)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:55)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:68)
        	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190)
        	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:424)
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
        	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)
        	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
        	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931)
        	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
        	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
        	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867)
        	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
        	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245)
        	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
        	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
        	at org.eclipse.jetty.server.Server.handle(Server.java:337)
        	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581)
        	at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1005)
        	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:560)
        	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:222)
        	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:417)
        	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:474)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        	at java.lang.Thread.run(Thread.java:680)
        
        Show
        Yoav Landman
        added a comment - - edited Looks like a wicket bug caused by assuming the wicket filter value ("webapp") is part of the forwarded URI (which doesn't contain "webapp"). So this will happen for any repo whose name is shorter than "webapp". The exception is swallowed. java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang. String .substring( String .java:1937) at java.lang. String .substring( String .java:1904) at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getContextRelativeUrl(ServletWebRequest.java:180) at org.apache.wicket.protocol.http.servlet.ServletWebRequest.getClientUrl(ServletWebRequest.java:140) at org.apache.wicket.request.UrlRenderer.<init>(UrlRenderer.java:59) at org.apache.wicket.request.cycle.RequestCycle.newUrlRenderer(RequestCycle.java:145) at org.apache.wicket.request.cycle.RequestCycle.getUrlRenderer(RequestCycle.java:169) at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:145) at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:148) at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:85) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:276) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:185) at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:147) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:55) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:68) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:424) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:346) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:115) at org.artifactory.webapp.servlet.RepoFilter.doRepoListing(RepoFilter.java:258) at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:122) at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:85) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.AccessFilter.useAuthentication(AccessFilter.java:276) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:185) at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:147) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:55) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:68) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1190) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:424) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:931) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:337) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:581) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1005) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:560) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:222) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:417) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:474) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang. Thread .run( Thread .java:680)
        Hide
        Yossi Shaul
        added a comment -

        Opened a bug in Wicket: WICKET-4387

        Show
        Yossi Shaul
        added a comment - Opened a bug in Wicket: WICKET-4387

          People

          • Assignee:
            Yossi Shaul
            Reporter:
            Yoav Landman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: