[wp-trac] [WordPress Trac] #56311: Week query variable is not being sanitized correctly
WordPress Trac
noreply at wordpress.org
Fri Jan 6 08:55:51 UTC 2023
#56311: Week query variable is not being sanitized correctly
-------------------------------------+-----------------------
Reporter: domainsupport | Owner: audrasjb
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.2
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+-----------------------
Comment (by domainsupport):
I've not run GitHub pull request unit tests on WordPress before and it
looks like your tests have already run.
I see these failures ... not sure if I should address them here on on
GitHub but ...
> 1) Tests_Canonical::test_canonical with data set #40 ('/2012/13/',
'/2012/')
> Failed asserting that two strings are identical.
> 2) Tests_Canonical::test_canonical with data set #41 ('/2012/11/51/',
'/2012/11/', 0, array('WP_Date_Query'))
> Failed asserting that two strings are identical.
I'm not sure these tests are relevant here? Or, if they are I guess if
invalid data is found then we should be forcing a 404 to prevent duplicate
content? Is that best done with `handle_404()` as well as or instead of
unsetting the `query_vars`?
> 3) Tests_Query_Conditionals::test_bad_dates
> 4) Tests_Query_VerbosePageRules::test_bad_dates
> Failed to assert that WP_Date_Query triggered an incorrect usage notice.
This is a good thing, right :)
> Failed asserting that an array is empty.
Do we have more details for this?
Also, please delete line 439 as it seems to have slipped through the net
and is not required ...
{{{#!php
<?php
$day_month_year_error_msg = '';
}}}
And thanks for adding in the missing `[ $key ]`!
Oliver
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56311#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list