[wp-trac] [WordPress Trac] #47980: New wp_validate_redirect() removes domain in some circumstances.
WordPress Trac
noreply at wordpress.org
Thu Sep 5 17:05:35 UTC 2019
#47980: New wp_validate_redirect() removes domain in some circumstances.
--------------------------+------------------------------
Reporter: rconde | Owner: SergeyBiryukov
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: critical | Resolution:
Keywords: | Focuses: accessibility
--------------------------+------------------------------
Comment (by jmmathc):
Can confirm it happens on Windows when logging out. I'd say it's because
`dirname` returns backslashes on Windows, and they're not stripped
correctly.
I've temporarily patched my servers with this fix, on the line that left
trims the slash from `$path`:
`$location = '/' . ltrim( $path . '/', '/\\' ) . $location;`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47980#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list