Page MenuHomeDevCentral

Avoid $_POST direct use
ClosedPublic

Authored by dereckson on Dec 25 2015, 19:11.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 20:54
Unknown Object (File)
Wed, Nov 6, 20:43
Unknown Object (File)
Wed, Nov 6, 18:47
Unknown Object (File)
Fri, Nov 1, 19:45
Unknown Object (File)
Sun, Oct 27, 04:35
Unknown Object (File)
Fri, Oct 25, 07:25
Unknown Object (File)
Oct 11 2024, 01:27
Unknown Object (File)
Oct 10 2024, 15:05
Subscribers
None

Details

Reviewers
dereckson
Commits
Unknown Object (Diffusion Commit)
rNOTIF61e3ec5a8698: Avoid $_POST direct use
Summary

Frameworks like Laravel offers wrappers around superglobals.

It allows a more versatile code (but $_REQUEST would do too),
and some sanitization.

Test Plan

(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

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Avoid $_POST direct use.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
This revision is now accepted and ready to land.Dec 25 2015, 19:12
This revision was automatically updated to reflect the committed changes.