Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#62877 new defect (bug)

Inconsistent behaviour of redirect guess when page is private

Reported by: jamieburchell's profile jamieburchell Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.7.1
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

I have a blog post with the name "Events Cancelled Due To Coronavirus" accessible at the URL "/news/2020/03/30/events-cancelled-due-to-coronavirus/". If I create a new page with the name "Events" and URL "/events" and set it to "Private", then "/events" redirects to the blog post "/news/2020/03/30/events-cancelled-due-to-coronavirus/". If I delete the page, the redirect does not happen.

The redirect guessing code appears to check get_query_var( 'name' ) and in the case of the private events page, this value is populated with "events" whereas for a missing page or a request for the URL "/even", this is not the case.

Change History (3)

#1 @sukhendu2002
7 weeks ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.27
  • Server: nginx/1.27.3
  • Database: mysqli (Server: 8.0.41 / Client: mysqlnd 8.2.27)
  • Browser: Chrome 132.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Error condition occurs (reproduced).

#2 @jamieburchell
7 weeks ago

I can also repro this with the page in "scheduled" or "draft" status

This ticket was mentioned in PR #8210 on WordPress/wordpress-develop by @sukhendu2002.


7 weeks ago
#3

  • Keywords has-patch has-unit-tests added
Note: See TracTickets for help on using tickets.