Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34632 closed defect (bug) (invalid)

Private page redirects to another page with similar permalink

Reported by: danielhuesken's profile danielhuesken Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Canonical Keywords:
Focuses: Cc:

Description (last modified by swissspidy)

We have a page marked as private.
This page has the slug test.
We have a second page with the slug test-page that is public.
Permalinks are active.

When we now log off and open the test page url it will be redirected to test-page.
But it should be a 404 page.

Change History (2)

#1 @swissspidy
9 years ago

  • Description modified (diff)

#2 @dd32
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This is the correct default behaviour, and has nothing to do with the fact there's a private page.

WordPress attempts to guess the intended url on 404's, in the example we assume that the post URL was cut off in the medium which the user retrieved the URL from.

If we changed this behaviour based on if a private page existed, we'd open up the possibility to leak the existence of a private page.

So.. if you want to disable the 404 redirect guessing, there's plugins and filters for that (I'm sure), but in core this is the intended behaviour.

Note: See TracTickets for help on using tickets.