AST-5032 - Security Fix: Added capability and admin checks to prevent unauthorized font deletion.#149
Merged
Merged
Conversation
Contributor
yssambare12
commented
Jan 14, 2026
- Security Fix: Added capability and admin checks to prevent unauthorized font deletion
Improved codebase for enhanced security.
There was a problem hiding this comment.
Pull request overview
This pull request implements a security fix to prevent unauthorized font deletion by adding capability and admin area checks to the BCF_Google_Fonts_Compatibility class constructor. The PR also bumps the plugin version from 2.1.16 to 2.1.17.
Changes:
- Added security checks (
is_admin()andcurrent_user_can('manage_options')) before destructive font operations - Updated version number across multiple files to 2.1.17
- Reorganized dependency structures in package-lock.json files
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| includes/class-bcf-google-fonts-compatibility.php | Added capability and admin area checks to prevent unauthorized font deletion in constructor |
| custom-fonts.php | Updated plugin version to 2.1.17 |
| package.json | Updated version to 2.1.17 |
| package-lock.json | Updated version (inconsistently) and reorganized prettier dependency location |
| admin/dashboard/package-lock.json | Reorganized string-width-cjs, strip-ansi-cjs, and wrap-ansi-cjs dependencies from nested to root level |
| README.md | Updated stable tag to 2.1.17 and removed trailing spaces from metadata lines |
Files not reviewed (1)
- admin/dashboard/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kiransbsf
approved these changes
Jan 14, 2026
kiransbsf
approved these changes
Jan 19, 2026
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
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.