Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse_cef where extension value contains an unescaped "=" character #784

Open
aacgood opened this issue Apr 5, 2024 · 0 comments
Open
Labels
vrl: stdlib Changes to the standard library

Comments

@aacgood
Copy link

aacgood commented Apr 5, 2024

Hi,

I am trying to parse the following using the parse_cef function however it returns error[E000]: function call error for "parse_cef" at (15:35): Could not parse whole line successfully

Note: I've stripped and anon'd the log but the offending part seems to be is in cs67 as it contains a url with an unescaped equals character.

{"message":"<114>2024-01-01T00:00:00.000Z MYHOST01 CEF:0|Vendor|Product|2024.7.0.2|DETECT_AND_RESPOND|ENDPOINT|9|cat=\"Endpoint\" cs2Label=incidentID cs2=00000000-0000-0000-0000-000000000000\" cs67Label=callbackURL cs67=\"https://my.domain.goes.here.com/#/incidents?incidentID=000000000-0000-0000-0000-000000000000\" cs68Label=tenantID cs68=INTERNAL "}

When I manually update incidentId= to be incidentId\\= then the parse_cef function works as expected, Whilst the value for cs67 is contained within quotes, it appears to be a bug where it doesnt parse.

As a side note, using the parse_key_value() function is able to extract the unescaped value correctly. This was tested using Vector 0.36.1 and can be replicated in VRL playground

Cheers

@pront pront added the vrl: stdlib Changes to the standard library label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vrl: stdlib Changes to the standard library
Projects
None yet
Development

No branches or pull requests

2 participants