Changeset 37646 for trunk/src/wp-includes/rest-api/class-wp-rest-server.php
- Timestamp:
- 06/06/2016 09:33:30 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r37490 r37646 281 281 } 282 282 283 // Check for invalid characters (only alphanumeric allowed). 284 if ( is_string( $_GET['_jsonp'] ) ) { 285 $jsonp_callback = preg_replace( '/[^\w\.]/', '', wp_unslash( $_GET['_jsonp'] ), -1, $illegal_char_count ); 286 if ( 0 !== $illegal_char_count ) { 287 $jsonp_callback = null; 288 } 289 } 290 if ( null === $jsonp_callback ) { 283 $jsonp_callback = $_GET['_jsonp']; 284 if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) { 291 285 echo $this->json_error( 'rest_callback_invalid', __( 'The JSONP callback function is invalid.' ), 400 ); 292 286 return false;
Note: See TracChangeset
for help on using the changeset viewer.