-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Remove deprecated RememberMeToken::getSecret()
and RememberMeToken's $secret
property
#61011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 8.0
Are you sure you want to change the base?
Conversation
RememberMeToken::getSecret()
and RememberMeToken's $secret
property
src/Symfony/Component/Security/Core/Authentication/Token/RememberMeToken.php
Outdated
Show resolved
Hide resolved
public function __serialize(): array | ||
{ | ||
// $this->firewallName should be kept at index 1 for compatibility with payloads generated before Symfony 8 | ||
return [$this->secret, $this->firewallName, parent::__serialize()]; | ||
// Newly serialized data removes the secret deprecated since Symfony 7.2 and removed in Symfony 8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the comment ? or the method ?
002f9c9
to
63e71e7
Compare
RememberMeToken::getSecret()
and RememberMeToken's $secret
propertyRememberMeToken::getSecret()
and RememberMeToken's $secret
property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the discussion with Oskar is resolved 🙂
} | ||
|
||
public function __unserialize(array $data): void | ||
{ | ||
[$this->secret, $this->firewallName, $parentData] = $data; | ||
// BC Layer with payloads generated before Symfony 8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// BC Layer with payloads generated before Symfony 8.0 | |
// BC Layer with payloads generated before Symfony 8.0, to be removed in Symfony 9.0 |
Is it ok to keep such a BC Layer here? @OskarStark @stof
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the constructor of the RememberMeAuthenticator
class also has to be updated
In which way ? I've removed the deprecation notice there : https://github.com/symfony/symfony/pull/61011/files#diff-8cdcb3fe63f51aca31c4a5869e39ffdfcc793d9d855df4498528a56e1bbd32cdL35-L39. Is there something I missed updating this ? |
@ktherage That's the token, but there also is an authenticator class. |
…erMeToken's secret property
…ions are triggered
…berMeToken.php Co-authored-by: Oskar Stark <[email protected]>
799ce91
to
9767a2a
Compare
@xabbuh I did it and rebased. Sorry for this forgetfulness. |
Uh oh!
There was an error while loading. Please reload this page.