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

Invalid returned value for Phalcon\Security::getSessionToken #14346

Closed
sergeyklay opened this issue Sep 2, 2019 · 0 comments
Closed

Invalid returned value for Phalcon\Security::getSessionToken #14346

sergeyklay opened this issue Sep 2, 2019 · 0 comments
Labels
bug A bug report status: medium Medium
Milestone

Comments

@sergeyklay
Copy link
Contributor

If you try to call $this->security->getSessionToken() in a controller w/o Security service initialization and declare(strict_types=1) you'll get:

Fatal error: Return value of Phalcon\Security::getSessionToken must be of type string, null returned

sergeyklay added a commit that referenced this issue Sep 2, 2019
@sergeyklay sergeyklay added this to the 4.0.0 milestone Sep 2, 2019
sergeyklay added a commit to phalcon/vokuro that referenced this issue Sep 2, 2019
sergeyklay added a commit to phalcon/vokuro that referenced this issue Sep 2, 2019
sergeyklay added a commit to phalcon/vokuro that referenced this issue Sep 2, 2019
* Code cleanup

* Fixed security service initialization

* Improved CS

* Change getSessionToken() to getRequestToken() in CSRF forms

* Added workaround for phalcon/cphalcon#14346

* Do not use helper container()
@niden niden mentioned this issue Sep 3, 2019
5 tasks
niden added a commit that referenced this issue Sep 3, 2019
Added checks for request/session
Added optional services injection in the constructor
niden added a commit that referenced this issue Sep 3, 2019
niden added a commit that referenced this issue Sep 3, 2019
niden added a commit that referenced this issue Sep 3, 2019
niden added a commit that referenced this issue Sep 3, 2019
niden added a commit that referenced this issue Sep 3, 2019
niden added a commit that referenced this issue Sep 3, 2019
@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
None yet
Development

No branches or pull requests

2 participants