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

Key value parsing in VerifyAssertionAsync is not strictly correct #143

Open
xPaw opened this issue Dec 18, 2022 · 1 comment
Open

Key value parsing in VerifyAssertionAsync is not strictly correct #143

xPaw opened this issue Dec 18, 2022 · 1 comment

Comments

@xPaw
Copy link

xPaw commented Dec 18, 2022

While looking at the implementation, I noticed that response parsing will skip any lines that have more than one colon, specifically here:

for (var line = await reader.ReadLineAsync(); line != null; line = await reader.ReadLineAsync())
{
var parameter = line.Split(':');
if (parameter.Length != 2)
{
continue;
}

As a result, a line ns:http://specs.openid.net/auth/2.0 will be skipped.

The specification says that a key or value MUST NOT contain a newline and a key also MUST NOT contain a colon. Notice that it does not say that values can't contain a colon.

Furthermore, the ns is not validated, but it should be present in the response according to the specification:

ns
Value: "http://specs.openid.net/auth/2.0"
This particular value MUST be present for the response to be a valid OpenID 2.0 response.

@kevinchalet
Copy link
Member

kevinchalet commented Dec 18, 2022

As mentioned in #126 (review), this project is not funded and no longer actively developed (not to mention OpenID 2.0 is basically a dead protocol). That said, if you're interested in sending a PR to fix such issues, feel free.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants