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

Disallow the use of $_Request #2750

Merged
merged 4 commits into from
Dec 20, 2019
Merged

Disallow the use of $_Request #2750

merged 4 commits into from
Dec 20, 2019

Conversation

Morerice
Copy link
Contributor

@Morerice Morerice commented Dec 7, 2019

Create a new sniff which will listen on the variable constant ($). If the $_REQUEST super global is detected, add the following error:

The $_REQUEST super global should not be used. Use $_GET, $_POST or $_COOKIE instead

This implements #2373

@Morerice Morerice changed the title Disallow the use of $_Request - Closes #2373 Disallow the use of $_Request Dec 7, 2019
@gsherwood gsherwood added this to the 3.5.4 milestone Dec 8, 2019
gsherwood added a commit that referenced this pull request Dec 20, 2019
@gsherwood gsherwood merged commit 6a09f8c into squizlabs:master Dec 20, 2019
@gsherwood
Copy link
Member

Thanks a lot for this contribution.

I decided to rename the sniff to Generic.PHP.DisallowRequestSuperglobal and change references to "super global" to "superglobal" as per the PHP manual. Other than that - I left it alone. Thanks for the docs as well.

@Morerice
Copy link
Contributor Author

@gsherwood You're welcome and thanks for guiding me on the first pr on this project. I hope I have time to tackle some other issues in the future.

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

Successfully merging this pull request may close these issues.

2 participants