From 35e5fbfe31e7486c833dd868984c031ca022b44c Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Wed, 17 Jan 2024 15:47:15 -0600 Subject: [PATCH] Auto-sizes: Disallow direct file access --- modules/images/auto-sizes/load.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/images/auto-sizes/load.php b/modules/images/auto-sizes/load.php index b751adbd1..fd7c939e2 100644 --- a/modules/images/auto-sizes/load.php +++ b/modules/images/auto-sizes/load.php @@ -8,6 +8,11 @@ * @since n.e.x.t */ +// Exit if accessed directly. +if ( ! defined( 'ABSPATH' ) ) { + exit; +} + // Define the constant. if ( defined( 'IMAGE_AUTO_SIZES_VERSION' ) ) { return;