Changeset 5907
- Timestamp:
- 08/11/2015 08:08:36 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
-
src/includes/common/functions.php (modified) (3 diffs)
-
tests/phpunit/testcases/common/verify-nonce.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r5853 r5907 1785 1785 1786 1786 // Maybe include the port, if it's included in home_url() 1787 if ( isset( $parsed_home['port'] ) ) {1787 if ( isset( $parsed_home['port'] ) && false === strpos( $_SERVER['HTTP_HOST'], ':' ) ) { 1788 1788 $request_host = $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT']; 1789 1789 } else { … … 1797 1797 /** Look for match ********************************************************/ 1798 1798 1799 // Filter the requested URL, for configurations like reverse proxying 1799 /** 1800 * Filters the requested URL being nonce-verified. 1801 * 1802 * Useful for configurations like reverse proxying. 1803 * 1804 * @since bbPress (2.5.0) 1805 * 1806 * @param string $requested_url The requested URL. 1807 */ 1800 1808 $matched_url = apply_filters( 'bbp_verify_nonce_request_url', $requested_url ); 1801 1809 1802 1810 // Check the nonce 1803 $result = isset( $_REQUEST[ $query_arg] ) ? wp_verify_nonce( $_REQUEST[$query_arg], $action ) : false;1811 $result = isset( $_REQUEST[ $query_arg ] ) ? wp_verify_nonce( $_REQUEST[ $query_arg ], $action ) : false; 1804 1812 1805 1813 // Nonce check failed … … 1808 1816 } 1809 1817 1810 // Do extra things 1818 /** 1819 * Fires at the end of the nonce verification check. 1820 * 1821 * @since bbPress (2.2.0) 1822 * 1823 * @param string $action Action nonce. 1824 * @param bool $result Boolean result of nonce verification. 1825 */ 1811 1826 do_action( 'bbp_verify_nonce_request', $action, $result ); 1812 1827
Note: See TracChangeset
for help on using the changeset viewer.