@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use "QUERY_STRING", not "REQUEST_URI", to parse raw request parameters

Summary:
Fixes T13260. "QUERY_STRING" and "REQUEST_URI" are similar for our purposes here, but our nginx documentation tells you to pass "QUERY_STRING" and doesn't tell you to pass "REQUEST_URI". We also use "QUERY_STRING" in a couple of other places already, and already have a setup check for it.

Use "QUERY_STRING" instead of "REQUEST_URI".

Test Plan: Visited `/oauth/google/?a=b`, got redirected with parameters preserved.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13260

Differential Revision: https://secure.phabricator.com/D20227

+4 -8
+4 -8
src/aphront/AphrontRequest.php
··· 591 591 } 592 592 593 593 public function getRequestURI() { 594 - $request_uri = idx($_SERVER, 'REQUEST_URI', '/'); 595 - 596 - $uri = new PhutilURI($request_uri); 597 - $uri->removeQueryParam('__path__'); 598 - 599 - $path = phutil_escape_uri($this->getPath()); 600 - $uri->setPath($path); 594 + $uri_path = phutil_escape_uri($this->getPath()); 595 + $uri_query = idx($_SERVER, 'QUERY_STRING', ''); 601 596 602 - return $uri; 597 + return id(new PhutilURI($uri_path.'?'.$uri_query)) 598 + ->removeQueryParam('__path__'); 603 599 } 604 600 605 601 public function getAbsoluteRequestURI() {