-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Security::checkToken() returns true with missing input #2596
Comments
My work-around with some added code for locking down specified GET routes.
|
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues |
checkToken()
is the same as issue #1912 (returns true on blank input), which makes some sense as not all methods are always protected by CSRF tokens. However means you have to first check for the$PHALCON/CSRF/KEY$
session var before hittingcheckToken()
if you wish to define certain controller/actions as requiring it. OtherwisecheckToken()
just returns true when given the missing session data with the expectation it will check everything. Some cases around building tokens into GET requests as querystrings, combined with remember-me cookie token auto-login, then hitting them with expired session. The querystring token passes as the session token is missing. Resubmitting a POST after session expiry is probably much the same.Probably functioning as designed and easy to implement the proper flow for enforcing the protection. Figured it's worth mentioning.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: