redirect_guess_404_permalink() can catch the wrong post types
|Reported by:||nacin||Owned by:||nacin|
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.)
Change History (16)
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
comment:8 jeremyfelt — 14 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
comment:12 ryan — 13 months ago
- Keywords has-patch commit removed
- Milestone changed from 3.4 to Future Release