[wp-trac] [WordPress Trac] #19693: redirect_guess_404_permalink() can catch the wrong post types
WordPress Trac
wp-trac at lists.automattic.com
Fri Dec 30 04:53:09 UTC 2011
#19693: redirect_guess_404_permalink() can catch the wrong post types
--------------------------+-----------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: Canonical | Version:
Severity: normal | Keywords:
--------------------------+-----------------
When I access /blah, and that 404s, redirect_guess_404_permalink() will
try to find a matching post name.
If blah is the start of a post name for a random post type (perhaps one
used as internal storage), it'll match it and redirect (and then end up
404ing, potentially). There's no constraint on the post type if the
post_type query var isn't set, which is going to be common.
We need to come up with a stricter query. (And while we're at it, we
should hook redirect_guess_404_permalink() into redirect_canonical() so it
may be unhooked without removing all canonical support.)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19693>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list