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

Stop interfering with $_POST superglobal #1144

Open
boonebgorges opened this issue Feb 1, 2023 · 1 comment
Open

Stop interfering with $_POST superglobal #1144

boonebgorges opened this issue Feb 1, 2023 · 1 comment

Comments

@boonebgorges
Copy link
Contributor

There are many places in the codebase where we modify what's in $_POST. This is a bad practice that can have unpredictable side effects. Instead, we should get content out of $_POST as needed, and in cases where we need to modify params submitted in the POST body, we should parse them into a local variable.

@boonebgorges boonebgorges added this to the 5.5.0 milestone Feb 1, 2023
@boonebgorges
Copy link
Contributor Author

This mostly happens in the NominateThisEndpoint class, because it then calls nominate_it(), and the latter method is built to look at the superglobal. The business logic should be abstracted into its own method so that we can avoid the $_POST overwriting. But I don't fully understand the nomination endpoint, other than to understand that it's intended for use with the Chrome extension. As such, I'm going to set this task aside for some future round of development.

@boonebgorges boonebgorges modified the milestones: 5.5.0, Future release Apr 26, 2023
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

No branches or pull requests

1 participant