.. / wordpress
Star Fork

The open source publishing platform of choice for millions of websites worldwide—from creators and small businesses to enterprises.

WordPress
WordPress
...

Latest

<script> @src 🛡️ wh-host ⏱️ any
More information

Root Cause

Source: https://github.com/WordPress/WordPress/blob/a1c733124b07c201d43e3f29524db6c8b0bc0f56/wp-includes/load.php#L1933

function wp_is_jsonp_request() {
  if ( ! isset( $_GET['_jsonp'] ) ) {
    return false;
  }

  if ( ! function_exists( 'wp_check_jsonp_callback' ) ) {
    require_once ABSPATH . WPINC . '/functions.php';
  }

  $jsonp_callback = $_GET['_jsonp'];
  if ( ! wp_check_jsonp_callback( $jsonp_callback ) ) {
    return false;
  }

  /** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */
  $jsonp_enabled = apply_filters( 'rest_jsonp_enabled', true );

  return $jsonp_enabled;
}

Source: https://github.com/WordPress/WordPress/blob/a1c733124b07c201d43e3f29524db6c8b0bc0f56/wp-includes/functions.php#L4629

function wp_check_jsonp_callback( $callback ) {
  if ( ! is_string( $callback ) ) {
    return false;
  }

  preg_replace( '/[^\w\.]/', '', $callback, -1, $illegal_char_count );

  return 0 === $illegal_char_count;
}

Related links:

Found by @paulosyibelo.


Source | History