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

Add check to avoid fatals on direct file access #584

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

pkevan
Copy link
Contributor

@pkevan pkevan commented Mar 7, 2024

Avoids fatal errors when these files are accessed directly e.g.

ja.wordpress.org 198.143.164.10 - [07/Mar/2024:09:04:13 +0000] "GET /cba94a84/wp-content/mu-plugins/pub-sync/blocks/time/ HTTP/1.1"

@StevenDufresne
Copy link
Contributor

@pkevan Need a review for this?

@pkevan
Copy link
Contributor Author

pkevan commented May 10, 2024

sure - can't remember doing this!

@StevenDufresne
Copy link
Contributor

Looks good to me, but added @dd32 and @ryelle seeing that they have more WP experience than myself :)

@dd32
Copy link
Member

dd32 commented May 13, 2024

Originally I suggested renaming these, or disabling direct PHP access at the server level, but that ran into issues (mostly, that the allow list is outdated).

I have no concerns about merging this, other than me not feeling it's warranted to have a check at the top of every .php file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants