[wp-trac] [WordPress Trac] #25317: Wrong guess in wp_guess_url() for symlinked install, or unit tests
WordPress Trac
noreply at wordpress.org
Fri Sep 13 23:33:09 UTC 2013
#25317: Wrong guess in wp_guess_url() for symlinked install, or unit tests
-----------------------------+-------------------------
Reporter: bpetty | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.7
Component: Upgrade/Install | Version: trunk
Severity: normal | Keywords: needs-patch
-----------------------------+-------------------------
The changes made in r25396 add additional checks, but could use a couple
more fixes.
A. In the case of symlinked installations (checkout of develop.svn, and
symlink public_html to 'src' for example), this fails to properly detect
the URL, and ends up appending a full path disclosure to the siteurl
option.
B. In the case of unit tests, this also fails to properly strip the
absolute file path off (since SCRIPT_FILENAME points to
tests/phpunit/includes/install.php instead), causing most canonical unit
tests to fail.
For (A), a confirmed solution is using `realpath()` on `SCRIPT_FILENAME`
first.
In the case of (B), we should probably just set `WP_SITEURL` in
bootstrap.php most likely - it would help keep `wp_guess_url()` simple and
specific to real installations.
If no-one else jumps on it, I can easily take care of (B), but still need
a patch on (A).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25317>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list