[wp-trac] [WordPress Trac] #31486: wp_redirect sends incorrect url when it contains non escaped unicode characters

WordPress Trac noreply at wordpress.org
Sat Feb 28 02:20:55 UTC 2015


#31486: wp_redirect sends incorrect url when it contains non escaped unicode
characters
--------------------------+------------------------------
 Reporter:  louyx         |       Owner:  pento
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  2.3
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by pento):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31587"]:
 {{{
 #!CommitTicketReference repository="" revision="31587"
 When sanitizing a URL to redirect to, UTF-8 characters can be URL encoded,
 instead of being removed.

 While RFC 3986 does not specify which character sets are allowed in URIs,
 Section 2.5 states that octects matching UTF-8 character encoding should
 be percent-encoded, then unreserved octets outside of the UTF-8 range
 should be percent-encoded. As browsers tend to only implement support for
 UTF-8 in URLs, this change only implements the UTF-8 encoding part. We may
 revisit the second part if it becomes an issue.

 Fixes #31486
 }}}

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


More information about the wp-trac mailing list