Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38912

Error redirecting Web Links with space in the title

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Non-Issue
    • Affects Version/s: 11.2
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
      None
    • Environment:
      Tomcat 8.0.32
    • 11 status:
      Please Merge
    • Previous Issue Keys:
      KNL-1497

      Description

      10-Feb-2017 12:25:11.986 WARNING [ajp-nio-8014-exec-10] org.apache.catalina.connector.Response.sendRedirect Failed to redirect to [https://www.youtube.com/results?search_query=john legend]
       java.lang.IllegalArgumentException: Illegal character in query at index 49: https://www.youtube.com/results?search_query=john legend
      	at java.net.URI.create(URI.java:852)
      	at org.apache.catalina.connector.Response.sendRedirect(Response.java:1280)
      	at org.apache.catalina.connector.Response.sendRedirect(Response.java:1252)
      	at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:500)
      	at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:138)
      	at org.sakaiproject.util.RequestFilter$WrappedResponse.sendRedirect(RequestFilter.java:1607)
      	at org.sakaiproject.content.impl.BaseContentService.handleAccessResource(BaseContentService.java:6963)
      	at org.sakaiproject.content.impl.BaseContentService$2.handleAccess(BaseContentService.java:7376)
      	at org.sakaiproject.access.tool.AccessServlet.dispatch(AccessServlet.java:348)
      	at org.sakaiproject.access.tool.AccessServlet.doGet(AccessServlet.java:194)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      	at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.sakaiproject.oauth.filter.OAuthPostFilter.doFilter(OAuthPostFilter.java:60)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:467)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.sakaiproject.oauth.filter.OAuthPreFilter.doFilter(OAuthPreFilter.java:74)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:676)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
      	at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:868)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.net.URISyntaxException: Illegal character in query at index 49: https://www.youtube.com/results?search_query=john legend
      	at java.net.URI$Parser.fail(URI.java:2848)
      	at java.net.URI$Parser.checkChars(URI.java:3021)
      	at java.net.URI$Parser.parseHierarchical(URI.java:3111)
      	at java.net.URI$Parser.parse(URI.java:3053)
      	at java.net.URI.<init>(URI.java:588)
      	at java.net.URI.create(URI.java:850)
      	... 43 more
      

      Test Plan:

      1.- Go to resources.
      2.- Click Add Web Links
      3.- Use this url: https://www.youtube.com/results?search_query=john+berger
      4.- Create the link
      5.- Try to access to the link you get a 404 error instead of being redirected.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  k1team KERNEL TEAM (Inactive)
                  Reporter:
                  jjmerono@um.es Juan José Meroño Sánchez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code