[wp-trac] [WordPress Trac] #47980: New wp_validate_redirect() removes domain in some circumstances.

WordPress Trac noreply at wordpress.org
Tue Sep 10 10:35:04 UTC 2019


#47980: New wp_validate_redirect() removes domain in some circumstances.
--------------------------+-----------------------------
 Reporter:  rconde        |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  5.2.4
Component:  General       |     Version:  5.2.3
 Severity:  critical      |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by x2l2):

 Replying to [comment:2 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;`

 where is the file to write this?  i had the same redirect problem when try
 to login, but the server is not windows

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47980#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list