Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2310

In HA, the passive node redirects the request with wrong URL encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1
    • 0.8.2, 1.0.0
    • None
    • None

    Description

      In HA, the passive node redirects the request with wrong URL encoding. Instead of encoding only the values, the whole query is encoded as a single string.

      url = "http://atlas.node.com:21000/api/atlas/entites?type=My type&name=My name"

      wrong result after encoding:
      http://atlas.node.com:21000/api/atlas/entites?type%3DMy+type%26name%3DMy+name

      expected result after encoding:
      http://atlas.node.com:21000/api/atlas/entites?type=My%20type&name=My%20name

      in the code, instead of https://github.com/apache/atlas/blob/master/webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java#L132

      queryString = URLEncoder.encode(queryString, "UTF-8");
      

      we should do something like

      import org.springframework.web.util.UriUtils
      queryString = UriUtils.encodeQuery(queryString, "UTF-8")
      
      

      Attachments

        1. ATLAS-2310.patch
          3 kB
          Péter Gergő Barna

        Activity

          People

            bpgergo Péter Gergő Barna
            bpgergo Péter Gergő Barna
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: