Opened 8 years ago
Last modified 8 days ago
#44899 new defect (bug)
redirect_canonical redirects to another URL when it should not
| Reported by: | melicerte | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Canonical | Version: | 4.9.8 |
| Severity: | critical | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
Hi,
on a fresh install of WordPress 4.9.8 :
will be redirected to :
Problem is : it does an 301. And, combined with Facebook mobile on Iphone link to the WordPress, it retries forever. 21 000 hits / 5 minutes on our server. Glad it was strong enough to sustain until we find the bug and temporarily deactivated
redirect_canonical
with :
<?php remove_action('template_redirect', 'redirect_canonical');
Change History (5)
#1
@
8 years ago
- Summary redirect_canonical redirects to another URL → redirect_canonical redirects to another URL when it should not
This ticket was mentioned in PR #13654 on WordPress/wordpress-develop by @faisalahammad.
7 weeks ago
#3
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
@lancewillett commented on PR #13654:
8 days ago
#5
PR #13654 landed in https://core.trac.wordpress.org/changeset/65132
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
https://core.trac.wordpress.org/ticket/44899
Add a regression test for encoded query string keys on a static front page. The existing canonical redirect logic already handles these keys correctly, but the ticket has no direct test covering the reported URL shape.
The test confirms that redirect_canonical() does not generate a redirect when the query string contains an encoded closing bracket in a parameter name.
Scope:
This change is limited to PHPUnit coverage for the canonical redirect behavior. No production code, public APIs, UI, accessibility, CSS, RTL, administration, or performance behavior is changed.
Testing: