[wp-trac] [WordPress Trac] #50422: Prevent Browser Caching From Getting Involved With wp_redirect and wp_safe_redirect (Leaving the Browser to Purely Honor the Redirect Code Used)

WordPress Trac noreply at wordpress.org
Tue Jun 22 17:41:55 UTC 2021


#50422: Prevent Browser Caching From Getting Involved With wp_redirect and
wp_safe_redirect (Leaving the Browser to Purely Honor the Redirect Code
Used)
-------------------------------------+------------------------------
 Reporter:  KZeni                    |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  General                  |     Version:  5.4.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+------------------------------

Comment (by KZeni):

 Just want to give this a mention as it seems we have plugins like Profile
 Builder having manually implemented a precaution against this (per
 https://wordpress.org/support/topic/proposed-bugfix-prevent-login-
 redirect-from-browser-cache-rules/), but then there are others like that
 such as Subway (https://wordpress.org/plugins/subway/) that might have
 this issue left unaddressed yet (going to be submitting a similar patch to
 them to fix it.)

 Meanwhile, I'm thinking there are certainly other plugins experiencing
 this bug now and/or definitely in the future until they find out they need
 to manually account for this.

 I think it really could/should be something WordPress itself just takes
 care of just as part of the redirect functions as proposed here so plugins
 aren't left to potentially having bugs with caching & redirects then not
 working properly and/or leaving the plugin developers to then implement a
 protection against it when it really shouldn't harm anything if WordPress
 did it for all developers just by using the built-in redirect functions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50422#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list