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

Prevent fatal errors while validating CSRF token of malformed requests #4380

Merged
merged 2 commits into from
Nov 22, 2021

Conversation

rob006
Copy link
Contributor

@rob006 rob006 commented Nov 21, 2021

Fixes strtr() expects parameter 1 to be string, array given (vendor/yiisoft/yii/framework/base/CSecurityManager.php:641) error in case of malformed requests (bots may try different things in order to find vulnerability, sending array as CSRF token in one of them).

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

@samdark samdark requested a review from a team November 21, 2021 21:15
@samdark
Copy link
Member

samdark commented Nov 21, 2021

Please add a line for CHANGELOG. Thanks.

@rob006
Copy link
Contributor Author

rob006 commented Nov 21, 2021

Done.

@marcovtwout marcovtwout merged commit b9991a3 into yiisoft:master Nov 22, 2021
@rob006 rob006 deleted the patch-1 branch November 22, 2021 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants