[wp-trac] [WordPress Trac] #56311: Week query variable is not being sanitized correctly

WordPress Trac noreply at wordpress.org
Tue Jun 3 08:42:08 UTC 2025


#56311: Week query variable is not being sanitized correctly
-------------------------------------------------+-------------------------
 Reporter:  domainsupport                        |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Query                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-test-info needs-unit-tests       |     Focuses:
  changes-requested                              |
-------------------------------------------------+-------------------------

Comment (by domainsupport):

 Replying to [comment:32 SirLouen]:
 > But with the patch, it doesnt throw an error, but it doesn't return
 anything right either (in this case, the canonical URL as @peterwilsoncc
 commented, which should be `http://localhost:8889/2025/05/` in this case)

 Can someone please explain why http://wp-dev.local/2023/09/51 is meant to
 redirect to http://wp-dev.local/2023/09/ ... ?

 What am I missing here? Is it that there's no trailing slash at the end of
 the requested URL meaning that the out-of-range day value needs to be
 ignored, truncated and canonically redirected?

 Thank you.

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


More information about the wp-trac mailing list