8000 Bugs when RememberMe use token_provider by xkobal · Pull Request #7436 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Bugs when RememberMe use token_provider #7436

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

Closed
wants to merge 2 commits into from
Closed

Bugs when RememberMe use token_provider #7436

wants to merge 2 commits into from

Conversation

xkobal
Copy link
Contributor
@xkobal xkobal commented Mar 20, 2013

When token_provider is used for remember_me in security.yml, it produces an Exception :

Catchable Fatal Error: Argument 5 passed to Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices::__construct() must be an instance of Symfony\Component\Security\Http\RememberMe\LoggerInterface, instance of Symfony\Bridge\Monolog\Logger given, called in /home/overblog/public_html/OverblogUser/app/cache/dev/appDevDebugProjectContainer.php on line 2358 and defined in /home/overblog/public_html/OverblogUser/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php line 46

The problem comes from missing use in PersistentTokenBasedRememberMeServices and wrong inheritance in security_rememberme.xml.

@xkobal
Copy link
Contributor Author
xkobal commented Mar 20, 2013

Another problem (maybe an issue ?) which is new in Symfony 2.2, it is the security.secure_random service. This service produce a good encryption, but in bytes when it is used with openssl_random_pseudo_bytes. The problem is that bytes is inusable as it in databases, without being encoded with bin2hex.

Maybe the security.secure_random need to have an option to encode in hexa instead of binary ?

@xkobal xkobal closed this Mar 20, 2013
@xkobal xkobal reopened this Mar 20, 2013
@@ -20,6 +20,7 @@
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Util\SecureRandomInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
Copy link
Member

Choose a reason for hiding this comment

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

This should be the PSR namespace instead

@xkobal xkobal closed this Mar 21, 2013
@xkobal xkobal reopened this Mar 21, 2013
@xkobal
Copy link
Contributor Author
xkobal commented Mar 21, 2013

Maybe tests have failed because I have reverted a commit ?

fabpot added a commit that referenced this pull request Mar 26, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #7436).

Discussion
----------

Bugs when RememberMe use token_provider

When token_provider is used for remember_me in security.yml, it produces an Exception :

Catchable Fatal Error: Argument 5 passed to Symfony\Component\Security\Http\RememberMe\PersistentTokenBasedRememberMeServices::__construct() must be an instance of Symfony\Component\Security\Http\RememberMe\LoggerInterface, instance of Symfony\Bridge\Monolog\Logger given, called in /home/overblog/public_html/OverblogUser/app/cache/dev/appDevDebugProjectContainer.php on line 2358 and defined in /home/overblog/public_html/OverblogUser/vendor/symfony/symfony/src/Symfony/Component/Security/Http/RememberMe/PersistentTokenBasedRememberMeServices.php line 46

The problem comes from missing use in PersistentTokenBasedRememberMeServices and wrong inheritance in security_rememberme.xml.

Commits
-------

a7784e5 Remove already defined arguments
c3b0ec4 Add missing use
@fabpot fabpot closed this Mar 26, 2013
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.

3 participants
0