Skip to content
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

fix AutoLoginToken serialization #22

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

espritf
Copy link
Contributor

@espritf espritf commented Nov 26, 2020

This PR fixes AutoLoginToken serialization for symfony/security-core > 4.3

symfony/security-core@f948fed

Copy link
Owner

@jmikola jmikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed review. I have one question on a possible change before merging.

[$this->key, $this->providerKey, $parentStr] = unserialize($str);
parent::unserialize($parentStr);
[$this->key, $this->providerKey, $parentData] = $data;
$parentData = \is_array($parentData) ? $parentData : unserialize($parentData);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quoting symfony/security-core@f948fed#diff-c5e43b78aa0cd524bf4965e55c5839b0e4eebc0afde1fd0ba45deb946d1734d9R187:

There is no need to unserialize any entry in $data, they are already ready-to-use.

In that case, would you agree that this line is redundant and should be removed?

$this->providerKey,
parent::serialize(),
));
return [$this->key, $this->providerKey, parent::__serialize()];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atiernan
Copy link

I'm also experiencing this issue. Is there any chance you could check over this PR @jmikola?

@jmikola jmikola merged commit 42686a1 into jmikola:master Feb 17, 2021
@jmikola
Copy link
Owner

jmikola commented Feb 17, 2021

Merged and released as 2.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants