Merged
Conversation
- Add current_user_can('manage_options') to submit_request handler
- Add current_user_can('edit_posts') to bsf_oembed_ajax_results handler
- Fix submit_request control flow: bail early on nonce failure instead
of running wp_mail() with empty fields
- Add sanitize_text_field(wp_unslash()) to nonce verification inputs
Fixes #218
- Replace esc_attr() on $_POST/$_GET with sanitize_text_field(), absint(), or intval() depending on data type - Add wp_unslash() before sanitization on superglobal access - Fix nonce values to use sanitize_text_field(wp_unslash()) before wp_verify_nonce() - Fix post IDs to use absint() instead of esc_attr() - Fix star ratings to use intval() instead of esc_attr() Fixes #219
- Replace generic 'ajax_nonce' action with 'bsf_meta_box_ajax_nonce' to prevent cross-plugin nonce collision - Replace basename(__FILE__) nonce action with explicit 'bsf_meta_box_nonce_action' string - Gate bsf_reset_options() behind $nonce_verified flag so it only executes after a per-option nonce check passes - Sanitize nonce and option values in reset handler Fixes #220
Replace deprecated 'administrator' role string with 'manage_options' capability in add_menu_page() call. Using role names as capabilities is deprecated WordPress behavior and may fail on custom installations or multisite. Fixes #221
- Replace DateTime exception echo with error_log() to prevent leaking PHP internals (file paths, timezone info) to frontend visitors; return $content unchanged instead of bare return - Sanitize field_id parameter in oEmbed AJAX response with sanitize_text_field(wp_unslash()) before output Fixes #222
fix: add capability checks to AJAX handlers
fix: replace esc_attr() misuse with proper input sanitization
fix: use capability instead of role in add_menu_page
fix: prevent information disclosure in error handling
Resolved conflicts in init.php and admin/index.php: - bsf_force_send(): sanitize nonce with sanitize_text_field(wp_unslash()) + correct action 'bsf_meta_box_ajax_nonce' - bsf_oembed_ajax_results(): sanitized nonce + capability check + wp_send_json_error() instead of die() - Added isset() guard on $_REQUEST['field_id'] - Replaced die() with wp_die() at end of AJAX handler - admin/index.php: kept $nonce_verified flag initialization, removed extra blank lines
- Align 'post_id' double arrow with 'bsf_meta_box_ajax_nonce' in array - Align $return equals sign with $field_id assignment
fix: strengthen nonce verification across plugin
- Sanitize $_SERVER values in get_the_ip() to prevent XSS - Escape IP output in rating form hidden field - Use wp_json_encode with JSON_HEX_TAG to prevent JSON-LD script injection - Escape product_rating option output to prevent stored XSS - Replace die() with wp_send_json_error/success in rating handlers - Sanitize nonce field in submit_color before wp_verify_nonce Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Strip CRLF from name/email in From: header to prevent email header injection - Replace die() with wp_send_json_success/error in submit_request() and submit_color() - Add sanitize_text_field(wp_unslash()) around nonce values in admin/index.php form handlers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ABSPATH direct access guards to 5 files missing them - Convert 80+ loose comparisons (== / !=) to strict (=== / !==) - Fix non-Yoda conditions to use constant-on-left pattern - Add strict flag (true) to all in_array() calls - Sanitize nonce values with sanitize_text_field(wp_unslash()) before wp_verify_nonce() - Replace print/exit with wp_die() for nonce failures in admin settings - Replace raw header() redirect with wp_safe_redirect() - Escape site_url() output with esc_url() - Remove closing PHP tags from PHP-only files - Fix equals sign alignment and double blank lines - Fix inline comment formatting Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add screen-reader-only CSS class and focus styles for keyboard navigation - Add fieldset/legend and aria-labels to star rating radio buttons - Replace generic image alt text with dynamic contextual values - Mark decorative star images as aria-hidden with empty alt - Add role="complementary" and aria-label to snippet boxes - Add role="presentation" to admin meta box layout table - Add aria-hidden state management to toggle.js show/hide logic - Refactor toggle.js to use lookup maps (reduces duplication) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: security audit round 2 - XSS, JSON-LD injection, die() replacement
…-coding-standards
Fix: Enforce WordPress Coding Standards compliance
…essibility-improvements
…vements Add WCAG accessibility improvements
sushmak02
approved these changes
Mar 11, 2026
sushmak02
reviewed
Mar 11, 2026
Added changelog and updated version number
sushmak02
approved these changes
Mar 11, 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.
No description provided.