Page MenuHomePhabricator

Ensure __path__ is set on POST requests when running on CLI webserver
AbandonedPublic

Authored by epriestley on Nov 11 2019, 6:27 PM.
Tags
None
Referenced Files
F13267014: D20903.diff
Tue, May 28, 11:37 PM
F13261280: D20903.diff
Mon, May 27, 12:52 AM
F13245207: D20903.diff
Thu, May 23, 5:51 AM
F13195458: D20903.diff
Sun, May 12, 10:24 PM
F13183185: D20903.id49823.diff
Fri, May 10, 7:22 AM
F13179543: D20903.diff
Wed, May 8, 9:16 PM
Unknown Object (File)
Sat, May 4, 6:50 PM
Unknown Object (File)
Wed, May 1, 12:14 AM
Subscribers

Details

Summary

Ref D20046 and https://secure.phabricator.com/D20046#254987 - the change causes the manually-set $REQUEST['__path__'] variable to get unset when $REQUEST is rebuilt from the original superglobals. This copies the value into $_GET in the CLI checks to ensure its available to the rebuilds (without duplicating the conditional logic in that method)

Test Plan

On a completely clean install of Phabricator running under CLI webserver, I finally succeeded at registering (in effect, the first ever POST request to the installation)

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

See T13575. This change should be obsoleted by D21506.

D21506 is pretty much just a higher-complexity version of this change that attempts to make this pathway a bit more robust to similar "rebuild the $_REQUEST superglobal"-style changes in the future. As far as I could tell, the description of the issue here is correct and this patch was likely the simplest correct change.