WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41999


Ignore:
Timestamp:
09/27/2017 08:25:20 AM (3 years ago)
Author:
swissspidy
Comment:

Other WP include and plugin files that contain direct code (rather than only function/class definitions), have a catch for this

Only some files include such checks, not all.

IMHO this is something that should be prevented on the web server level using .htaccess or similar.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41999

    • Property Keywords close added
    • Property Type changed from defect (bug) to enhancement
  • Ticket #41999 – Description

    initial v1  
    88Other WP include and plugin files that contain direct code (rather than only function/class definitions), have a catch for this:
    99
     10{{{
    1011 if ( ! defined( 'ABSPATH' ) ) {
    1112         exit; // Exit if accessed directly.
    1213 }
     14}}}
    1315
    1416I suggest this gets added to the top of the /wp-includes/theme-compat/embed.php file.