Apache CXF is not decoding url parameters correctly.

Description

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

The GET Request (encoded):

The GET Request (decoded):

The value in SearchContext:

The result after parsing:

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

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Benjamin Reed August 30, 2017 at 3:30 PM

Fixed in foundation-2017

Benjamin Reed August 29, 2017 at 8:48 PM

So the CXF FIQL parser has an option, search.decode.values, which we need to enable to be able to search for strings with FIQL reserved characters (like comma) in them.  Unfortunately, this means each value on the right-hand-side of a FIQL comparator should be double-encoded (once, to make it through standard HTTP URL-decoding, and a second time to be decoded by the CXF FIQL engine).

 

I've committed a fix that lets us parse these dates properly, but if we really need to be double-encoding things, I'm not sure I like it.  We're better off fully double-encoding all of the values when we create them, and documenting well that the OpenNMS FIQL processor is in search.decode.values mode.

 

Thoughts?

Fixed

Details

Assignee

Reporter

Labels

Components

Sprint

Priority

PagerDuty

Created August 14, 2017 at 7:41 AM
Updated September 20, 2017 at 3:32 PM
Resolved August 30, 2017 at 3:30 PM