From 679935f768345356b0f38910ca33d54b24630357 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 6 Mar 2025 00:16:25 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@59943 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/plugins/hello.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php index ff55908342..e10ecb3b24 100644 --- a/src/wp-content/plugins/hello.php +++ b/src/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