Make WordPress Core

Changeset 59117


Ignore:
Timestamp:
09/30/2024 01:54:44 AM (23 months ago)
Author:
peterwilsoncc
Message:

Editor: Prevent direct access to /wp-includes/blocks/index.php.

Adds a check for ABSPATH to the top of the /wp-includes/blocks/index.php file and prevents the file from loading if it is not defined.

This prevents the file from throwing errors when accessed directly.

Props khokansardar, mukesh27.
Fixes #62108.
See #60352.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks/index.php

    r57028 r59117  
    55 * @package WordPress
    66 */
     7
     8// Don't load directly.
     9if ( ! defined( 'ABSPATH' ) ) {
     10        die( '-1' );
     11}
    712
    813define( 'BLOCKS_PATH', ABSPATH . WPINC . '/blocks/' );
Note: See TracChangeset for help on using the changeset viewer.