Skip to:
Content

bbPress.org

Changeset 4361


Ignore:
Timestamp:
11/08/2012 08:23:37 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Add filter to bbp_verify_nonce_request() to allow hot-swapping of the request match.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/functions.php

    r4268 r4361  
    14081408
    14091409        // Get the home URL
    1410         $home_url = strtolower( home_url() );
     1410        $home_url      = strtolower( home_url() );
    14111411
    14121412        // Build the currently requested URL
    … …  
    14141414        $requested_url = strtolower( $scheme . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    14151415
     1416        // Filter the requested URL, for configurations like reverse proxying
     1417        $matched_url   = apply_filters( 'bbp_verify_nonce_request_url', $requested_url );
     1418
    14161419        // Check the nonce
    14171420        $result = isset( $_REQUEST[$query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;
    14181421
    14191422        // Nonce check failed
    1420         if ( empty( $result ) || empty( $action ) || ( strpos( $requested_url, $home_url ) !== 0 ) )
     1423        if ( empty( $result ) || empty( $action ) || ( strpos( $matched_url, $home_url ) !== 0 ) )
    14211424                $result = false;
    14221425
Note: See TracChangeset for help on using the changeset viewer.