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

Issue parsing Digest challenge #441

Open
womblep opened this issue Jun 4, 2021 · 0 comments
Open

Issue parsing Digest challenge #441

womblep opened this issue Jun 4, 2021 · 0 comments

Comments

@womblep
Copy link

womblep commented Jun 4, 2021

I have a server respond with a challenge of:
WWW-Authenticate: Digest realm="realmhere",qop="auth,auth-int",nonce="60b9e1bc89661",opaque="0e3a3074e5fdc57d09"

This causes the response to have ...,qop="auth, ... with the missing quote at the end and that makes the server choke of the response and reject it
The problem is in parse_challenge_param because the regex is just looking for commas to signify the sections of the challenge and this value has commas within the value.

I very quickly patched around it for my case by striping off a leading quote if there wasn't a trailing one but that might not be the right solution

Maybe doing a split with a regex of something like this ",(?=([^\"]"[^\"]")[^\"]$)" (note untested, just found on google)

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

No branches or pull requests

1 participant