-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Non-java clients identity pool extension comma parsing #5001
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (3)
- src/rdkafka_sasl_oauthbearer_oidc.c: Language not supported
- src/rdstring.c: Language not supported
- src/rdstring.h: Language not supported
🎉 All Contributor License Agreements have been signed. Ready to merge. |
src/rdstring.c
Outdated
* @returns The parsed fields in an array. The number of elements in the | ||
* array is returned in \p cntp. | ||
*/ | ||
char **rd_string_split_csv(const char *input, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should return error code and also handle the cases where input string is invalid, like "
started but no ending "
present.
src/rdstring.c
Outdated
{ | ||
"extension1:extension1val,\"extension2:extension2val1," | ||
"extension2val2\"", | ||
',', | ||
rd_true, | ||
2, | ||
{"extension1:extension1val", | ||
"extension2:extension2val1,extension2val2"}, | ||
}, | ||
{ | ||
"extension1:extension1val,extension2:extension2val1", | ||
',', | ||
rd_true, | ||
2, | ||
{"extension1:extension1val", "extension2:extension2val1"}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add other edge cases like empty string, string with just a single k:v pair, and using escape sequences. And also test for invalid strings.
Thanks @PratRanj07. Some minor comments, but overall looks good. Let's verify manually with a cluster too. |
Also verify if the extensions have spaces can they be parsed correctly and interpreted by the broker. Like |
src/rdstring.c
Outdated
|
||
*cntp = 0; | ||
|
||
// Count approximate field count (ignore sep inside quotes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place comments in /* */ blocks
7e45383
to
64748cc
Compare
64748cc
to
fd3ec88
Compare
fd3ec88
to
a8c3765
Compare
This PR intends to implement CSV format parsing for SASL OAuthbearer Extensions.
Supported extension format examples: