[wp-trac] [WordPress Trac] #60208: Prevent redirect loops
WordPress Trac
noreply at wordpress.org
Sun Jan 7 20:16:15 UTC 2024
#60208: Prevent redirect loops
----------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version:
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
There are all kinds of issues open that deal with redirect loops and their
patches try to resolve the symptom.
I propose to instead fix the root cause by checking in
wp_redirect/wp_safe_redirect if the $location is equal to the current
host/request uri and if that's the case to not execute the redirect but
wp_die - just like it's done in those function if response code is not in
the 3xx range.
If a rogue plugin causes this, this will at least give you a hint of what
was happening/where to start, when your WP page suddenly starts to reload
indefinitely.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60208>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list