diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index e19b7d39d5..60adba37fa 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -15,6 +15,8 @@ Directory.Build.props checks this property using the following condition: + Microsoft.Net.Http.Headers; + Microsoft.AspNetCore.CookiePolicy; Microsoft.AspNetCore.DataProtection.EntityFrameworkCore; @microsoft/signalr; Microsoft.Net.Http.Headers; diff --git a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj index 0c06ca81ea..75a27f8fb2 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj +++ b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/OpenIdConnectSample.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.0 diff --git a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/Startup.cs b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/Startup.cs index 7107bbe397..b95455cff5 100644 --- a/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/Startup.cs +++ b/src/Security/Authentication/OpenIdConnect/samples/OpenIdConnectSample/Startup.cs @@ -30,6 +30,7 @@ namespace OpenIdConnectSample } public IConfiguration Configuration { get; set; } + public IWebHostEnvironment Environment { get; } private void CheckSameSite(HttpContext httpContext, CookieOptions options) diff --git a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj index 20a6b1ecef..f0618ce35e 100644 --- a/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj +++ b/src/Security/Authentication/WsFederation/samples/WsFedSample/WsFedSample.csproj @@ -15,6 +15,7 @@ + diff --git a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj index 8aef9e3bf9..784f3b5e59 100644 --- a/src/Security/Authentication/samples/SocialSample/SocialSample.csproj +++ b/src/Security/Authentication/samples/SocialSample/SocialSample.csproj @@ -22,6 +22,8 @@ + + diff --git a/src/Security/CookiePolicy/test/CookiePolicyTests.cs b/src/Security/CookiePolicy/test/CookiePolicyTests.cs index dbe2826c40..cd8165e654 100644 --- a/src/Security/CookiePolicy/test/CookiePolicyTests.cs +++ b/src/Security/CookiePolicy/test/CookiePolicyTests.cs @@ -43,6 +43,7 @@ namespace Microsoft.AspNetCore.CookiePolicy.Test context.Response.Cookies.Append("C", "C", new CookieOptions { SameSite = Http.SameSiteMode.None }); context.Response.Cookies.Append("D", "D", new CookieOptions { SameSite = Http.SameSiteMode.Lax }); context.Response.Cookies.Append("E", "E", new CookieOptions { SameSite = Http.SameSiteMode.Strict }); + context.Response.Cookies.Append("F", "F", new CookieOptions { SameSite = (Http.SameSiteMode)(-1) }); return Task.FromResult(0); }; @@ -236,6 +237,7 @@ namespace Microsoft.AspNetCore.CookiePolicy.Test Assert.Equal("C=C; path=/; samesite=none", transaction.SetCookie[2]); Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); + Assert.Equal("F=F; path=/", transaction.SetCookie[5]); })); } diff --git a/src/Security/Security.sln b/src/Security/Security.sln index 32566c7143..93250dc8a4 100644 --- a/src/Security/Security.sln +++ b/src/Security/Security.sln @@ -164,6 +164,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.HttpSys", "..\Servers\HttpSys\src\Microsoft.AspNetCore.Server.HttpSys.csproj", "{D6C3C4A9-197B-47B5-8B72-35047CBC4F22}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Net.Http.Headers", "..\Http\Headers\src\Microsoft.Net.Http.Headers.csproj", "{4BB8D7D7-E111-4A86-B6E5-C1201E0DA8CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU