Skip to content

Commit 390713b

Browse files
committed
mark the RememberMeDetails class as final
1 parent b97c70e commit 390713b

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

UPGRADE-7.4.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Routing
8585
Security
8686
--------
8787

88+
* Mark the `RememberMeDetails` class as `final`
8889
* Deprecate callable firewall listeners, extend `AbstractListener` or implement `FirewallListenerInterface` instead
8990
* Deprecate `AbstractListener::__invoke`
9091
* Deprecate `LazyFirewallContext::__invoke()`

src/Symfony/Component/Security/Http/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
7.4
55
---
66

7+
* Mark the `RememberMeDetails` class as `final`
78
* Add support for union types with `#[CurrentUser]`
89
* Deprecate callable firewall listeners, extend `AbstractListener` or implement `FirewallListenerInterface` instead
910
* Deprecate `AbstractListener::__invoke`

src/Symfony/Component/Security/Http/RememberMe/RememberMeDetails.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
/**
1818
* @author Wouter de Jong <wouter@wouterj.nl>
19+
*
20+
* @final since Symfony 7.4
1921
*/
2022
class RememberMeDetails
2123
{
@@ -89,7 +91,7 @@ public static function fromRawCookie(string $rawCookie): self
8991
throw new AuthenticationException('The user identifier contains a character from outside the base64 alphabet.');
9092
}
9193

92-
if ('' === $cookieParts[0]) {
94+
if ('' === $cookieParts[0] && (self::class === static::class || self::class === (new \ReflectionMethod(static::class, '__construct'))->class)) {
9395
unset($cookieParts[0]);
9496
} else {
9597
$cookieParts[0] = strtr($cookieParts[0], '.', '\\');

0 commit comments

Comments
 (0)