-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH Add samesite attribute to cookies.
Co-authored-by: pine3ree <[email protected]>
- Loading branch information
1 parent
6f27dad
commit 31c974c
Showing
10 changed files
with
506 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: 4.12.0 (unreleased) | ||
--- | ||
|
||
# 4.12.0 (unreleased) | ||
|
||
## Overview | ||
|
||
- [Regression test and Security audit](#audit) | ||
- [Features and enhancements](#features-and-enhancements) | ||
- [Samesite attribute on cookies](#cookies-samesite) | ||
- [Other features](#other-features) | ||
- [Bugfixes](#bugfixes) | ||
|
||
## Regression test and Security audit{#audit} | ||
|
||
This release has been comprehensively regression tested and passed to a third party for a security-focused audit. | ||
|
||
While it is still advised that you perform your own due diligence when upgrading your project, this work is performed to ensure a safe and secure upgrade with each recipe release. | ||
|
||
## Features and enhancements {#features-and-enhancements} | ||
|
||
### Samesite attribute on cookies {#cookies-samesite} | ||
|
||
The `samesite` attribute is now set on all cookies. To avoid backward compatability issues, the `Lax` value has been set by default, but we recommend reviewing the requirements of your project and setting an appropriate value. | ||
|
||
The default value can be set for all cookies (except for the session cookie) in yaml configuration like so: | ||
|
||
```yml | ||
SilverStripe\Control\Cookie: | ||
default_samesite: 'Strict' | ||
``` | ||
Check out the [cookies documentation](/developer_guides/cookies_and_sessions/cookies#samesite-attribute) for more information. | ||
The session cookie is handled separately. You can configure it like so: | ||
```yml | ||
SilverStripe\Control\Session: | ||
cookie_samesite: 'Strict' | ||
``` | ||
Note that if you set the `samesite` attribute to `None`, the `secure` is automatically set to `true` as required by the specification. | ||
|
||
For more information about the `samesite` attribute check out https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite | ||
|
||
### Other new features {#other-features} | ||
|
||
## Bugfixes {#bugfixes} | ||
|
||
This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release! | ||
|
||
<!--- Changes below this line will be automatically regenerated --> | ||
|
||
<!--- Changes above this line will be automatically regenerated --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.