From ac459cf68898409a90352539dbc9b7d319f123d5 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Thu, 6 Mar 2025 00:18:28 +0000 Subject: [PATCH] Plugins: Restric direct access to Hello Dolly PHP file. This changeset restricts direct access call to `/wp-content/plugins/hello.php`, and removes the "Uncaught exception Error" warning that shows when `WP_DEBUG` is enabled and when accessing the related file directly. Props deepakrohilla, SergeyBiryukov, szepeviktor, audrasjb. Fixes #61214. Built from https://develop.svn.wordpress.org/trunk@59943 git-svn-id: http://core.svn.wordpress.org/trunk@59285 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/plugins/hello.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index ff55908342..e10ecb3b24 100644 --- a/wp-content/plugins/hello.php +++ b/wp-content/plugins/hello.php @@ -12,6 +12,11 @@ Version: 1.7.2 Author URI: http://ma.tt/ */ +// Do not load directly. +if ( ! defined( 'ABSPATH' ) ) { + die(); +} + function hello_dolly_get_lyric() { /** These are the lyrics to Hello Dolly */ $lyrics = "Hello, Dolly diff --git a/wp-includes/version.php b/wp-includes/version.php index 27b29d40fa..f01673ee62 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-beta1-59942'; +$wp_version = '6.8-beta1-59943'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.