Frameworks like Laravel offers wrappers around superglobals.
It allows a more versatile code (but $_REQUEST would do too),
and some sanitization.
Differential D119
Avoid $_POST direct use Authored by dereckson on Dec 25 2015, 19:11. Tags None Referenced Files
Subscribers None
Details
Frameworks like Laravel offers wrappers around superglobals. It allows a more versatile code (but $_REQUEST would do too), (1) Capture a request (for example through Runscope) with this code: protected function extractPayload () {
$this->payload = $_POST;
print_r($_POST);
abort(503, "Debugging payload");
}(2) Replace by $this->payload = Request::all();. (3) Replay the request, and check if the reply diff is identical
Diff Detail
|