Page MenuHomeDevCentral

Avoid $_POST direct use
ClosedPublic

Authored by dereckson on Dec 25 2015, 19:11.
Tags
None
Referenced Files
F8436389: D119.id284.diff
Wed, May 14, 06:12
F8434890: D119.id283.diff
Wed, May 14, 05:33
F8427888: D119.diff
Wed, May 14, 02:20
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
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
No Lint Coverage
Unit
No Test Coverage
Branch
request
Build Status
Buildable 144
Build 144: arc lint + arc unit

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.