-
Notifications
You must be signed in to change notification settings - Fork 27
Add support for checksum verification of must-use plugins #145
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
Open
Copilot
wants to merge
11
commits into
main
Choose a base branch
from
copilot/add-checksum-verification-must-use-plugins
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+243
−20
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Copilot
AI
changed the title
[WIP] Add support for checksum verification of must-use plugins
Add support for checksum verification of must-use plugins
Jan 7, 2026
swissspidy
reviewed
Jan 9, 2026
swissspidy
reviewed
Jan 9, 2026
This comment was marked as resolved.
This comment was marked as resolved.
- Remove get_mu_plugin_list() wrapper, use get_mu_plugins() directly - Rename get_plugin_slug_from_header() to get_plugin_slug_from_path() and remove unused parameter - Extract version retrieval into get_plugin_version_for_verification() method - Fix critical bug: create check_mu_file_checksum() to properly handle WPMU_PLUGIN_DIR paths Co-authored-by: swissspidy <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
- Add optional base_dir parameter to check_file_checksum() and get_absolute_path() - Remove duplicate check_mu_file_checksum() method - Update verify_mu_plugin() to use unified check_file_checksum() with WPMU_PLUGIN_DIR - Reduces code duplication and improves maintainability Co-authored-by: swissspidy <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
swissspidy
reviewed
Jan 11, 2026
swissspidy
reviewed
Jan 11, 2026
- Throw exception when checksums retrieval returns false - Centralize error handling in single catch block - Remove duplicate logic for single-file MU plugin warnings - Improves code maintainability Co-authored-by: swissspidy <[email protected]>
When strpos() returns false, $mu_file has no '/' character, meaning it's already just a filename without a directory path. The basename() call is redundant in this case. Co-authored-by: swissspidy <[email protected]>
swissspidy
reviewed
Jan 11, 2026
Changed from get_mu_plugins() to get_plugins('/../mu-plugins') to include both single files in the base mu-plugins directory and plugins in subdirectories. get_mu_plugins() only returns single files in the base directory.
Co-authored-by: swissspidy <[email protected]>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Plan: Add Must-Use Plugin Checksum Verification
--exclude-mu-pluginsflag to command synopsisChecksum_Plugin_Command::__invoke()to fetch and verify MU pluginsverify_mu_plugin)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.