WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#24623 closed defect (bug) (fixed)

Redirection goes wrong with an additional parameter at /?feed=rss

Reported by: sweetie089 Owned by: SergeyBiryukov
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.3
Component: Canonical Keywords: has-patch
Focuses: Cc:

Description

If a permalink accesses "/?feed=rss&foo=bar" in the state of being invalid, it will redirect to "/?feed=rss2 foo=bar" and "404 Not Found" will be displayed.

procedure for reproducing:

Result:

  • "404 Not Found" is displayed.

The cause was carrying out the miswritten word of the backreference by preg_replace.
patch is miswritten word correction simply.

Attachments (2)

redirect_canonical_rss_rewrite_bug_test.patch (405 bytes) - added by sweetie089 10 months ago.
redirect_canonical_rss_rewrite_bug.patch (680 bytes) - added by sweetie089 10 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 sweetie08910 months ago

I am sorry, the file was mistaken.

comment:2 SergeyBiryukov10 months ago

  • Component changed from Feeds to Canonical
  • Milestone changed from Awaiting Review to 3.6

Confirmed. If permalinks are disabled, /?feed=rss&withcomments=1 redirects to /?feed=rss2withcomments=1.

Introduced in [18537]. The patch and the test both look good.

comment:3 SergeyBiryukov10 months ago

In 1297/tests:

Add a test for obsolete feed redirection. props sweetie089. see #24623.

comment:4 SergeyBiryukov10 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 24502:

Use correct backreference in obsolete feed redirection code. props sweetie089. fixes #24623.

comment:5 sweetie08910 months ago

Thank you.

comment:6 SergeyBiryukov10 months ago

  • Version changed from trunk to 3.3
Note: See TracTickets for help on using tickets.