Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deny direct access to theme PHP files? #367

Closed
27 tasks done
crftwrk opened this issue Jan 18, 2023 Discussed in #366 · 0 comments · Fixed by #694 or #696
Closed
27 tasks done

Deny direct access to theme PHP files? #367

crftwrk opened this issue Jan 18, 2023 Discussed in #366 · 0 comments · Fixed by #694 or #696
Labels
enhancement New feature or request

Comments

@crftwrk
Copy link
Member

crftwrk commented Jan 18, 2023

Discussed in #366

Originally posted by jmcintyresage January 18, 2023
Shortly after public launch, one of our Bootscore-based sites started getting hit with requests for the base theme's index.php and search.php files, resulting in fatal PHP errors because get_header() wasn't defined.

Would the developers consider adding code that would deny direct access to the base theme's PHP files? Something as simple as:

// Stop if this file is called directly
defined( 'ABSPATH' ) || exit;

Respectfully,
JIm

Theme

template-parts

Plugins

@crftwrk crftwrk closed this as completed Apr 13, 2023
@crftwrk crftwrk reopened this Aug 11, 2023
@crftwrk crftwrk added the enhancement New feature or request label Aug 11, 2023
This was referenced Feb 24, 2024
@crftwrk crftwrk linked a pull request Mar 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Status: Done
Status: Done
Status: Done
Status: Done
1 participant