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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/incoming/controllers.html
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ <h2><a class="toc-backref" href="#id8">forceHTTPS</a><a class="headerlink" href=
or <a class="reference internal" href="incomingrequest.html#incomingrequest-retrieving-raw-data"><span class="std std-ref">$request-&gt;getRawInput()</span></a>
or <a class="reference internal" href="incomingrequest.html#incomingrequest-getting-data"><span class="std std-ref">$request-&gt;getVar()</span></a>, and an attacker
could change what data is validated.</p>
<p>If you want to use the request with only HTML post, you can use <span class="std std-ref">$validation->validateData($request->getPost(), $rules)</span>. Because <span class="std std-ref">withRequest()</span> uses <span class="std std-ref">$request->getVar()</span>, the data comes from $_GET, $_POST, $_COOKIE. This can cause a conflict if there is a same named cookie and get or post value.</p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
Expand Down Expand Up @@ -1258,4 +1259,4 @@ <h2><a class="toc-backref" href="#id28">That’s it!</a><a class="headerlink" hr
</script>

</body>
</html>
</html>