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

KeyValue Parser fails when the Value field is quoted, but includes an equals sign #474

Open
Dylan-M opened this issue Nov 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Dylan-M
Copy link
Contributor

Dylan-M commented Nov 1, 2021

Describe the bug
Parsing a key value set with = as delimiter will fail if the values are quoted, but contain = character.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/observIQ/custom-configs/tree/ups-infosec-2/ups/infosec
  2. Download the cloud_config.yaml and the logs/wgcs_1635530341.cloud.log to a stanza instance, editing the config as needed
  3. Run ./stanza -c cloud_config.yaml --log_file ./kv.log > kv.out (You'll want to ctrl-c) this after awhile, since it take a very long time to process fully)
  4. Do jq . kv.log to see the error output and jq . kv.out to see what Stanza is outputting

Expected behavior
For Stanza to treat quoted fields as a single field, and not look for special characters, especially the delimiter, within them.

Environment:

  • Tested on both Linux and OSX
  • Stanza v1.2.12 and 1.2.13

Additional context
Currently affecting PoC for UPS Infosec team. This could (and likely will) be replaced for them with the XML parser (this log is all single element XML with lots of K=V pairs within the element) if/when that becomes ready. However, this is still a defect that should be remedied.

@Dylan-M Dylan-M added the bug Something isn't working label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant