You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
CookieParser.Parse() instantiates cookie like this:
HttpCookie cookie = new HttpCookie(nameAndValue.Key, nameAndValue.Value)
{
// Path defaults to /, want to be able to roundtrip non-existing field.
Path = null
};
This creates cookie with HttpOnly and Secure properties set to "true" by default. As a result duplicate cookies will be added to response with incorrectly set HttpOnly and Secure properties if they were not present in first place.
The text was updated successfully, but these errors were encountered:
More details on this. The aforementioned issue will happen when asp.net app has web.config with the following entry:
httpCookies requireSSL="true" httpOnlyCookies="true"
It seems that HttpCookie constructor behavior depends on this config setting so the proper fix is to always explicitly set HttpOnly and Secure properties
When I first created this middleware, there was no support in the .NET Framework for the httponly and secure flags. Guess it's time to add those. And to update the package name to Sustainsys.OwinCookieSaver.
CookieParser.Parse() instantiates cookie like this:
HttpCookie cookie = new HttpCookie(nameAndValue.Key, nameAndValue.Value)
{
// Path defaults to /, want to be able to roundtrip non-existing field.
Path = null
};
This creates cookie with HttpOnly and Secure properties set to "true" by default. As a result duplicate cookies will be added to response with incorrectly set HttpOnly and Secure properties if they were not present in first place.
The text was updated successfully, but these errors were encountered: