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

canary: changed uses of jwt.TagList.Contains() to jwt.TagList.ContainsEqualFold(), this relaxes matching to be case-insensitive #5950

Closed
wants to merge 2 commits into from

Conversation

aricart
Copy link
Member

@aricart aricart commented Oct 1, 2024

This changes uses of jwt.Contains() to jwt.ContainsEqualsFold(), allowing case-insensitive matching in the jwt.TagList
Signed-off-by: Your Name alberto@synadia.com

…ld(), this relaxes matching to be case-insensitive

Signed-off-by: Alberto Ricart <alberto@synadia.com>
@aricart aricart marked this pull request as ready for review October 1, 2024 20:36
@aricart aricart requested a review from a team as a code owner October 1, 2024 20:36
@aricart
Copy link
Member Author

aricart commented Oct 1, 2024

This requires the pointed-at branch of JWT, which we need to merge before updating the go.mod to a released version.

…sensitive, but values are.

Signed-off-by: Alberto Ricart <alberto@synadia.com>
@aricart
Copy link
Member Author

aricart commented Oct 1, 2024

Added an utility to jwt.TagList that can return value portion of a tag - where the tag format is tagname:tagvalue, but at the very least tag name has a single character, and tag value is not empty. In those cases, tagname is case-insensitive, the tag value utility returns the value portion of the entry (could be multiple) with the tagname: stripped. This simplifies the code in the server to simply extracting the tag names.

@aricart aricart closed this Oct 2, 2024
@aricart aricart deleted the equals-fold branch October 2, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant