Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9578

Apache CXF is not decoding url parameters correctly.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 20.1.0, Meridian-2017.1.0
    • REST
    • Security Level: Default (Default Security Scheme)
    • Horizon - August 23rd, Horizon - August 30th

    Description

      When implementing JS-20 I stumbled upon an issue where some encoded dates weren`t decoded properly.

      The GET Request (encoded):

      curl -v -X GET -u admin:admin -H 'Accept: application/json' http://localhost:8980/opennms/api/v2/alarms\?_s\=alarmAckTime%3D%3D1970-01-01T00%3A00%3A00.000%2B0000\&limit\=0
      

      The GET Request (decoded):

      http://localhost:8980/opennms/api/v2/alarms\?_s\=alarmAckTime==1970-01-01T00:00:00.000+0000\&limit\=0
      

      The value in SearchContext:

      "org.apache.cxf.message.Message.QUERY_STRING" -> "_s=alarmAckTime%3D%3D1970-01-01T00%3A00%3A00.000%2B0000&limit=0"
      

      The result after parsing:

      "alarmAckTime" -> "1970-01-01T00:00:00.000 0000"
      

      The problem seems to be the + (%2B), which is decoded as SPACE (%20).

      Attachments

        Activity

          People

            ranger Benjamin Reed
            mvr Markus von RĂ¼den
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.