Skip to:
Content

BuddyPress.org

Changeset 5611


Ignore:
Timestamp:
12/30/2011 04:04:18 PM (13 years ago)
Author:
boonebgorges
Message:

Bail from bp_canonical_redirect() during POST requests, in order to maintain backward compatibility with plugins that submit form requests to non-canonical URIs. Fixes #3852

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r5425 r5611  
    524524   
    525525    if ( !bp_is_blog_page() && apply_filters( 'bp_do_redirect_canonical', true ) ) {
     526        // If this is a POST request, don't do a canonical redirect.
     527        // This is for backward compatibility with plugins that submit form requests to
     528        // non-canonical URLs. Plugin authors should do their best to use canonical URLs in
     529        // their form actions.
     530        if ( !empty( $_POST ) ) {
     531            return;
     532        }
     533       
    526534        // build the URL in the address bar
    527535        $requested_url  = is_ssl() ? 'https://' : 'http://';
Note: See TracChangeset for help on using the changeset viewer.