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

Use validateData() to validate POST data only #40

Closed
wants to merge 1 commit into from
Closed

Use validateData() to validate POST data only #40

wants to merge 1 commit into from

Conversation

obozdag
Copy link

@obozdag obozdag commented Nov 6, 2023

Instead of withRequest(), use validateData() to validate POST data only. withRequest() uses $request->getVar() which returns $_GET, $_POST and $_COOKIE data in that order. Newer values override older values. Post values will be overriden by the cookies if they have the same name.

Description
Explain what you have changed, and why.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

Instead of withRequest(), use validateData() to validate POST data only. withRequest() uses $request->getVar() which returns $_GET, $_POST and $_COOKIE data in that order. Newer values override older values. Post values will be overriden by the cookies if they have the same name.
Copy link

github-actions bot commented Nov 6, 2023

Thank you for your pull request. However, you have submitted your PR on a read-only split of codeigniter4/CodeIgniter4. This repository, unfortunately, does not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4 repository.

Thank you.

@github-actions github-actions bot closed this Nov 6, 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

Successfully merging this pull request may close these issues.

1 participant