Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/22/2012 09:58:26 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Redirects:

  • Always use wp_safe_redirect() in bbPress.
  • Nothing should/will redirect off-site.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/plugin/bbp-includes/bbp-user-functions.php

    r3918 r3919  
    433433 * @uses bbp_get_favorites_link() To get the favorites page link
    434434 * @uses bbp_get_topic_permalink() To get the topic permalink
    435  * @uses wp_redirect() To redirect to the url
     435 * @uses wp_safe_redirect() To redirect to the url
    436436 */
    437437function bbp_favorites_handler() {
     
    502502            }
    503503
    504             wp_redirect( $redirect );
     504            wp_safe_redirect( $redirect );
    505505
    506506            // For good measure
     
    750750 * @uses bbp_get_subscription_link() To get the subscription page link
    751751 * @uses bbp_get_topic_permalink() To get the topic permalink
    752  * @uses wp_redirect() To redirect to the url
     752 * @uses wp_safe_redirect() To redirect to the url
    753753 */
    754754function bbp_subscriptions_handler() {
     
    818818            }
    819819
    820             wp_redirect( $redirect );
     820            wp_safe_redirect( $redirect );
    821821
    822822            // For good measure
     
    849849 * @uses delete_option() To delete the displayed user's email id option
    850850 * @uses bbp_get_user_profile_edit_url() To get the edit profile url
    851  * @uses wp_redirect() To redirect to the url
     851 * @uses wp_safe_redirect() To redirect to the url
    852852 * @uses check_admin_referer() To verify the nonce and check the referer
    853853 * @uses current_user_can() To check if the current user can edit the user
     
    896896            delete_option( $user_id . '_new_email' );
    897897
    898             wp_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
     898            wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
    899899            exit;
    900900        }
     
    903903
    904904        delete_option( $user_id . '_new_email' );
    905         wp_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
     905        wp_safe_redirect( add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $user_id ) ) );
    906906        exit;
    907907
     
    962962        $redirect = add_query_arg( array( 'updated' => 'true' ), bbp_get_user_profile_edit_url( $edit_user ) );
    963963
    964         wp_redirect( $redirect );
     964        wp_safe_redirect( $redirect );
    965965        exit;
    966966    }
Note: See TracChangeset for help on using the changeset viewer.