Skip to content

Disallow direct file access to plugin files#48

Merged
dkotter merged 2 commits intodevelopfrom
fix/47
May 14, 2025
Merged

Disallow direct file access to plugin files#48
dkotter merged 2 commits intodevelopfrom
fix/47

Conversation

@faisal-alvi
Copy link
Copy Markdown
Contributor

Description of the Change

Added a security check to all PHP files in the Jobber plugin that could be executed directly. This ensures that if the files are accessed outside of WordPress, they will immediately exit, following WordPress.org plugin security guidelines.

Closes #47

How to test the Change

  1. Attempt to access any PHP file in the Jobber plugin directly via the browser; the script should exit with no output.
  2. Activate and use the plugin in WordPress to ensure normal functionality is unaffected.

Changelog Entry

Security - Added ABSPATH check to all executable PHP files to prevent direct access.

Credits

Props @dkotter @faisal-alvi

Checklist:

@faisal-alvi faisal-alvi added this to the 1.0.0 milestone May 14, 2025
@faisal-alvi faisal-alvi requested a review from dkotter May 14, 2025 11:45
@faisal-alvi faisal-alvi self-assigned this May 14, 2025
… that were missing; fix namespace issue on class
@dkotter dkotter marked this pull request as ready for review May 14, 2025 14:39
@dkotter dkotter merged commit dcffbda into develop May 14, 2025
7 of 8 checks passed
@dkotter dkotter deleted the fix/47 branch May 14, 2025 14:39
@github-actions github-actions Bot added the needs:code-review This requires code review. label May 14, 2025
@dkotter dkotter mentioned this pull request May 22, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow direct file access to plugin files

2 participants