-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Authentication Schemes with spaces in the names no longer work with 5.0 preview 8 #25266
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
Comments
If not intentional, looks like the name would need to be encoded in these two places:
|
This is an unanticipated consequence of #23578. I'll look into it. |
Cookie auth is also likely affected: aspnetcore/src/Security/Authentication/Cookies/src/PostConfigureCookieAuthenticationOptions.cs Line 33 in 3e1e69e
|
For the correlation cookie I think we can remove the auth scheme name. We already add a unique id to each cookie name so the scheme name isn't important. For cookie auth we'll need to encode the scheme name. |
Note the downlevel patch for this issue used a more conservative mitigation that does not introduce the same regression: #24389. We did not want to apply that same mitigation in 5.0 because it has side effects for enumeration of request cookies. |
Encode or replace the spaces with something else? |
* Handle auth schemes in cookie names #25266 * With unicode
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
After updating aspnet-contrib/AspNet.Security.OAuth.Providers (aspnet-contrib/AspNet.Security.OAuth.Providers#438) to .NET 5.0 preview 8, the "Visual Studio Online" provider no longer works. Its authentication scheme name is
"Visual Studio Online"
(note the spaces).If this is an intentional change then this can be closed, but as Authentication Schemes with spaces in their names have previously been working up until .NET 5.0 preview 7 I'm making the assumption this is a regression.
Removing the spaces from the authentication scheme's name stops the exception from being thrown.
To Reproduce
Checkout aspnet-contrib/AspNet.Security.OAuth.Providers@fb1e5f2 and then change the value of
AuthenticationScheme
here to"Visual Studio Online"
, then rundotnet test
.Exceptions (if any)
Further technical details
The text was updated successfully, but these errors were encountered: