Page MenuHomePhabricator

Produce correct query strings from PhutilUri regardless of ini settings
ClosedPublic

Authored by richardvanvelzen on Oct 14 2015, 5:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 7:53 AM
Unknown Object (File)
Sat, Nov 16, 3:57 AM
Unknown Object (File)
Thu, Nov 14, 2:08 AM
Unknown Object (File)
Thu, Nov 14, 1:42 AM
Unknown Object (File)
Thu, Nov 14, 1:27 AM
Unknown Object (File)
Thu, Nov 14, 12:51 AM
Unknown Object (File)
Thu, Nov 14, 12:07 AM
Unknown Object (File)
Tue, Nov 12, 2:42 PM
Subscribers

Details

Summary

http_build_query will use the separator set in arg_separator.output. When this is set to & (which happens in various environments) this causes query parameters to have the & doubly encoded.

Test Plan
-> php -r 'ini_set("arg_separator.output", "&"); echo http_build_query([1, 2, 3], "", "&");'
0=1&1=2&2=3

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

richardvanvelzen retitled this revision from to Product correct query strings from PhutilUri regardless of ini settings.
richardvanvelzen updated this object.
richardvanvelzen edited the test plan for this revision. (Show Details)
richardvanvelzen added a reviewer: epriestley.
richardvanvelzen set the repository for this revision to rPHU libphutil.
richardvanvelzen retitled this revision from Product correct query strings from PhutilUri regardless of ini settings to Produce correct query strings from PhutilUri regardless of ini settings.Oct 14 2015, 5:24 PM
richardvanvelzen edited edge metadata.
This revision is now accepted and ready to land.Oct 14 2015, 5:25 PM
This revision was automatically updated to reflect the committed changes.