8000 [10.x] Cookies Having Independent Partitioned State (CHIPS) (#48745) · laravel/framework@bd30b02 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd30b02

Browse files
authored
[10.x] Cookies Having Independent Partitioned State (CHIPS) (#48745)
* [10.x] Cookies Having Independent Partitioned State (CHIPS) * Clean up cookie duplication * Bump components symfony/http-foundation version
1 parent 378e4b3 commit bd30b02

File tree

10 files changed

+21
-16
lines changed

10 files changed

+21
-16
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"symfony/console": "^6.2",
4545
"symfony/error-handler": "^6.2",
4646
"symfony/finder": "^6.2",
47-
"symfony/http-foundation": "^6.3",
47+
"symfony/http-foundation": "^6.4",
4848
"symfony/http-kernel": "^6.2",
4949
"symfony/mailer": "^6.2",
5050
"symfony/mime": "^6.2",

src/Illuminate/Cookie/Middleware/EncryptCookies.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ protected function encrypt(Response $response)
195195
*/
196196
protected function duplicate(Cookie $cookie, $value)
197197
{
198-
return new Cookie(
199-
$cookie->getName(), $value, $cookie->getExpiresTime(),
200-
$cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(),
201-
$cookie->isHttpOnly(), $cookie->isRaw(), $cookie->getSameSite()
202-
);
198+
return $cookie->withValue($value);
203199
}
204200

205201
/**

src/Illuminate/Cookie/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"illuminate/contracts": "^10.0",
2121
"illuminate/macroable": "^10.0",
2222
"illuminate/support": "^10.0",
23-
"symfony/http-foundation": "^6.2",
23+
"symfony/http-foundation": "^6.4",
2424
"symfony/http-kernel": "^6.2"
2525
},
2626
"autoload": {

src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ protected function newCookie($request, $config)
211211
$config['secure'],
212212
false,
213213
false,
214-
$config['same_site'] ?? null
214+
$config['same_site'] ?? null,
215+
$config['partitioned'] ?? false
215216
);
216217
}
217218

src/Illuminate/Http/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"illuminate/macroable": "^10.0",
2323
"illuminate/session": "^10.0",
2424
"illuminate/support": "^10.0",
25-
"symfony/http-foundation": "^6.2",
25+
"symfony/http-foundation": "^6.4",
2626
"symfony/http-kernel": "^6.2",
2727
"symfony/mime": "^6.2"
2828
},

src/Illuminate/Routing/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"illuminate/pipeline": "^10.0",
2626
"illuminate/session": "^10.0",
2727
"illuminate/support": "^10.0",
28-
"symfony/http-foundation": "^6.2",
28+
"symfony/http-foundation": "^6.4",
2929
"symfony/http-kernel": "^6.2",
3030
"symfony/routing": "^6.2"
3131
},

src/Illuminate/Session/Middleware/StartSession.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,16 @@ protected function addCookieToResponse(Response $response, Session $session)
219219
{
220220
if ($this->sessionIsPersistent($config = $this->manager->getSessionConfig())) {
221221
$response->headers->setCookie(new Cookie(
222-
$session->getName(), $session->getId(), $this->getCookieExpirationDate(),
223-
$config['path'], $config['domain'], $config['secure'] ?? false,
224-
$config['http_only'] ?? true, false, $config['same_site'] ?? null
222+
$session->getName(),
223+
$session->getId(),
224+
$this->getCookieExpirationDate(),
225+
$config['path'],
226+
$config['domain'],
227+
$config['secure'] ?? false,
228+
$config['http_only'] ?? true,
229+
false,
230+
$config['same_site'] ?? null,
231+
$config['partitioned'] ?? false
225232
));
226233
}
227234
}

src/Illuminate/Session/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"illuminate/filesystem": "^10.0",
2323
"illuminate/support": "^10.0",
2424
"symfony/finder": "^6.2",
25-
"symfony/http-foundation": "^6.2"
25+
"symfony/http-foundation": "^6.4"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/Illuminate/Testing/TestResponse.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ public function getCookie($cookieName, $decrypt = true, $unserialize = false)
498498
$cookie->isSecure(),
499499
$cookie->isHttpOnly(),
500500
$cookie->isRaw(),
501-
$cookie->getSameSite()
501+
$cookie->getSameSite(),
502+
$cookie->isPartitioned()
502503
);
503504
}
504505
}

src/Illuminate/Validation/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"illuminate/macroable": "^10.0",
2626
"illuminate/support": "^10.0",
2727
"illuminate/translation": "^10.0",
28-
"symfony/http-foundation": "^6.2",
28+
"symfony/http-foundation": "^6.4",
2929
"symfony/mime": "^6.2"
3030
},
3131
"autoload": {

0 commit comments

Comments
 (0)
0