Page MenuHomeDevCentral

Avoid $_POST direct use
ClosedPublic

Authored by dereckson on Dec 25 2015, 19:11.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 23, 00:57
Unknown Object (File)
Wed, Apr 23, 00:56
Unknown Object (File)
Tue, Apr 22, 18:59
Unknown Object (File)
Mon, Apr 21, 10:42
Unknown Object (File)
Apr 12 2025, 00:00
Unknown Object (File)
Apr 11 2025, 21:38
Unknown Object (File)
Apr 11 2025, 16:33
Unknown Object (File)
Apr 10 2025, 14:19
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.