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

Use actual CSV parser to correctly handle quoted values #16

Merged
merged 1 commit into from Apr 11, 2019

Conversation

Projects
None yet
2 participants
@danotorrey
Copy link
Contributor

commented Apr 5, 2019

Use an actual CSV parser to parse the PA payload instead of just straight splitting on commas.

This causes quoted CSV values with embedded commas to be parsed correctly as a single value. eg. "Testing 1, 2, 3" will now be correctly parsed as a single value.

Fixes #15

Needs backport to 3.0 branch for 3.0.2 release.

Use actual CSV parser to correctly handle quoted values
This causes quoted CSV values with embedded commas to be parsed correctly as a single value. eg. \"Testing 1, 2, 3\" will now be correctly parsed as a single value.

@danotorrey danotorrey self-assigned this Apr 5, 2019

@danotorrey

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2019

Oops, meant to open this as a draft PR. Not ready for review. Need to do more cleanup.

@danotorrey

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

Some values in test data were also sanitized.

@danotorrey danotorrey requested a review from bernd Apr 10, 2019

@bernd

bernd approved these changes Apr 11, 2019

@bernd bernd merged commit 0983497 into master Apr 11, 2019

2 checks passed

graylog-project/pr Jenkins build graylog-project-pr-snapshot 3643 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the issue-15 branch Apr 11, 2019

@bernd bernd assigned bernd and unassigned danotorrey Apr 11, 2019

ceruleancee added a commit that referenced this pull request Apr 11, 2019

Use actual CSV parser to correctly handle quoted values (#16)
This causes quoted CSV values with embedded commas to be parsed correctly as a single value. eg. \"Testing 1, 2, 3\" will now be correctly parsed as a single value.

(cherry picked from commit 0983497)

bernd added a commit that referenced this pull request Apr 12, 2019

Use actual CSV parser to correctly handle quoted values (#16) (#17)
This causes quoted CSV values with embedded commas to be parsed correctly as a single value. eg. \"Testing 1, 2, 3\" will now be correctly parsed as a single value.

(cherry picked from commit 0983497)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.