[wp-trac] [WordPress Trac] #40339: If $home_path=='wp' then WP::parse_request() will remove 'wp' from 'wp-json/wc/v1/products' in $pathinfo
WordPress Trac
noreply at wordpress.org
Fri Jan 12 02:33:30 UTC 2018
#40339: If $home_path=='wp' then WP::parse_request() will remove 'wp' from 'wp-
json/wc/v1/products' in $pathinfo
---------------------------------------+------------------------------
Reporter: Magenta Cuda | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 4.7.3
Severity: normal | Resolution:
Keywords: needs-patch needs-testing | Focuses:
---------------------------------------+------------------------------
Changes (by dd32):
* keywords: => needs-patch needs-testing
Comment:
Hey @Magenta-Cuda and welcome back to Trac.
In most cases, `PHP_INFO` should only be the trailing component, however
that's not always the case unfortunately.
IIS (particularly older versions I think) actually pass the whole
`REQUEST_URI` in there - see https://msdn.microsoft.com/en-
us/library/ms524602(v=vs.90).aspx
I'm wondering if we can change this regex to effectively be:
{{{
$home_path_regex = '!^wp(?:/|$)!i'
$pathinfo = 'wp-json/wc/v1/products'
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40339#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list