Skip to content

Commit 7a6c539

Browse files
authored
Add breaking change for ASP.NET Core 3.0 (#15909)
* Add breaking change for ASP.NET Core 3.0 * react to feedback
1 parent 57affcf commit 7a6c539

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

docs/core/compatibility/2.2-3.0.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Breaking changes, version 2.2 to 3.0 - .NET Core
33
description: Lists the breaking changes from version 2.2 to version 3.0 of .NET Core, ASP.NET Core, and EF Core.
4-
ms.date: "10/16/2019"
4+
ms.date: "11/20/2019"
55
---
66
# Breaking changes for migration from Version 2.2 to 3.0
77

@@ -81,6 +81,10 @@ If you're migrating from version 2.2 to version 3.0 of .NET Core, ASP.NET Core,
8181

8282
***
8383

84+
[!INCLUDE[HTTP: Some cookie SameSite default values changed](~/includes/core-changes/aspnetcore/3.0/http-cookie-samesite-defaults-change.md)]
85+
86+
***
87+
8488
[!INCLUDE[HTTP: Synchronous IO disabled by default](~/includes/core-changes/aspnetcore/3.0/http-synchronous-io-disabled.md)]
8589

8690
***

docs/core/compatibility/aspnetcore.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: ASP.NET Core breaking changes - .NET Core
33
description: Lists the breaking changes in ASP.NET Core.
4-
ms.date: "10/17/2019"
4+
ms.date: "11/20/2019"
55
author: "scottaddie"
66
ms.author: "scaddie"
77
---
@@ -83,6 +83,10 @@ The following is a list of ASP.NET Core breaking changes by ASP.NET Core version
8383

8484
***
8585

86+
[!INCLUDE[HTTP: Some cookie SameSite default values changed](~/includes/core-changes/aspnetcore/3.0/http-cookie-samesite-defaults-change.md)]
87+
88+
***
89+
8690
[!INCLUDE[HTTP: Synchronous IO disabled by default](~/includes/core-changes/aspnetcore/3.0/http-synchronous-io-disabled.md)]
8791

8892
***
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
### HTTP: Some cookie SameSite defaults changed to None
2+
3+
`SameSite` is an option for cookies that can help mitigate some Cross-Site Request Forgery (CSRF) attacks. When this option was initially introduced, inconsistent defaults were used across various ASP.NET Core APIs. The inconsistency has led to confusing results. As of ASP.NET Core 3.0, these defaults are better aligned. You must opt in to this feature on a per-component basis.
4+
5+
#### Version introduced
6+
7+
3.0
8+
9+
#### Old behavior
10+
11+
Similar ASP.NET Core APIs used different default <xref:Microsoft.AspNetCore.Http.SameSiteMode> values. An example of the inconsistency is seen in `HttpResponse.Cookies.Append(String, String)` and `HttpResponse.Cookies.Append(String, String, CookieOptions)`, which defaulted to `SameSiteMode.None` and `SameSiteMode.Lax`, respectively.
12+
13+
#### New behavior
14+
15+
All the affected APIs default to `SameSiteMode.None`.
16+
17+
#### Reason for change
18+
19+
The default value was changed to make `SameSite` an opt-in feature.
20+
21+
#### Recommended action
22+
23+
Each component that emits cookies needs to decide if `SameSite` is appropriate for its scenarios. Review your usage of the affected APIs and reconfigure `SameSite` as needed.
24+
25+
#### Category
26+
27+
ASP.NET Core
28+
29+
#### Affected APIs
30+
31+
- <xref:Microsoft.AspNetCore.Http.IResponseCookies.Append(System.String,System.String,Microsoft.AspNetCore.Http.CookieOptions)?displayProperty=nameWithType>
32+
- <xref:Microsoft.AspNetCore.Builder.CookiePolicyOptions.MinimumSameSitePolicy%2A?displayProperty=nameWithType>
33+
34+
<!--
35+
36+
#### Affected APIs
37+
38+
- `M:Microsoft.AspNetCore.Http.IResponseCookies.Append(System.String,System.String,Microsoft.AspNetCore.Http.CookieOptions)`
39+
- `Overload:Microsoft.AspNetCore.Builder.CookiePolicyOptions.MinimumSameSitePolicy`
40+
41+
-->

0 commit comments

Comments
 (0)