Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-1055

Spark page characters "&" should be treated as a delimiter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.13.0
    • 0.14.0
    • Server

    Description

      I am a beginner of apache knox. When I use knox to proxy my sparkhistoryui, I meet this problem.

       <a href="/history/application_1505879554093_0036/stages/stage?id=0&amp;attempt=0" class="name-link">

      Some query parameters in the response body of the spark history ui contain a

      &amp;

      org.apache.hadoop.gateway.util.urltemplate.Parser#consumeQueryToken does not handle this case

      StringTokenizer tokenizer = new StringTokenizer( token, "?&" );
            while( tokenizer.hasMoreTokens() ) {
              consumeQuerySegment( builder, tokenizer.nextToken() );
            }
      

      so,I changed the code block as bellows

      String[] tokens = token.split("(&amp;|\\?|&)");
            if (tokens != null){
              for (String nextToken : tokens){
                consumeQuerySegment(builder,nextToken);
              }
            }
      

      Attachments

        1. KNOX-1055.002.patch
          2 kB
          Sandeep More
        2. KNOX-1055.patch
          2 kB
          Mars

        Activity

          People

            Unassigned Unassigned
            MarsChan Mars
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: