-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 20.1.0, Meridian-2017.1.0
-
Component/s: REST
-
Security Level: Default (Default Security Scheme)
-
Labels:
-
Sprint:Horizon - August 23rd, Horizon - August 30th
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).