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

fix: update regex to account for idToken being last key value pair in cookie string #33

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

timbakkum
Copy link
Contributor

Issue # (if available):
n/a

Description of changes:

We found that the cookie's key-value pairs order matters for this class to work properly. If the idToken is the last cookie in the cookie string, then a ; won't be added at the end of it. However, the Regex for extracting the idToken value currently expect this to always be there.

This PR updates the RegEx to account for both matching a final ; and for matching the end of the string value.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@timbakkum timbakkum changed the title fix: update regex to account for idToken being last fix: update regex to account for idToken being last key value pair in cookie string Apr 4, 2022
@jeandek jeandek self-requested a review April 12, 2022 14:46
@jeandek jeandek added the bug Something isn't working label Apr 12, 2022
@jeandek jeandek added this to the 1.2.2 milestone Apr 12, 2022
@jeandek jeandek merged commit 0eca9ac into awslabs:main Apr 12, 2022
@jeandek
Copy link
Contributor

jeandek commented Apr 12, 2022

Hi Tim,
Nice work spotting this and thanks for submitting a PR. I've merged it and expect to release a new version of the package by the end of the week.
Cheers,
Jean

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

Successfully merging this pull request may close these issues.

2 participants