From 9a74743b4c888d3784f38b5c551900555d346ba4 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 18 Feb 2008 17:42:51 +0000 Subject: [PATCH] Make sure plugin is a file before loading. Props filosofo. fixes #5822 git-svn-id: http://svn.automattic.com/wordpress/trunk@6897 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 26cce2725c..c84d418f61 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -53,7 +53,7 @@ if (isset($plugin_page)) { wp_die(__('Invalid plugin page')); } - if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page")) + if (! ( file_exists(ABSPATH . PLUGINDIR . "/$plugin_page") && is_file( ABSPATH . PLUGINDIR . "/$plugin_page") ) ) wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); do_action('load-' . $plugin_page);