Ticket #24063: 24063.patch
File 24063.patch, 1.6 KB (added by , 12 years ago) |
---|
-
wp-includes/functions.php
1174 1174 * @return string URL with nonce action added. 1175 1175 */ 1176 1176 function wp_nonce_url( $actionurl, $action = -1, $name = '_wpnonce' ) { 1177 if ( -1 == $action ) 1178 _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action as the second parameter.' ), '3.6' ); 1179 1177 1180 $actionurl = str_replace( '&', '&', $actionurl ); 1178 1181 return esc_html( add_query_arg( $name, wp_create_nonce( $action ), $actionurl ) ); 1179 1182 } … … 1207 1210 * @return string Nonce field. 1208 1211 */ 1209 1212 function wp_nonce_field( $action = -1, $name = "_wpnonce", $referer = true , $echo = true ) { 1213 if ( -1 == $action ) 1214 _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action as the first parameter.' ), '3.6' ); 1215 1210 1216 $name = esc_attr( $name ); 1211 1217 $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce( $action ) . '" />'; 1212 1218 -
wp-includes/pluggable.php
829 829 * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5) 830 830 */ 831 831 function check_ajax_referer( $action = -1, $query_arg = false, $die = true ) { 832 if ( -1 == $action ) 833 _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.6' ); 834 832 835 if ( $query_arg ) 833 836 $nonce = $_REQUEST[$query_arg]; 834 837 else