Draft: task/CO-3478_security_update - #49
Open
github-actions[bot] wants to merge 12 commits into
Open
Conversation
…-2026-9234) Add current_user_can('manage_woocommerce') capability checks and nonce verification to JtlConnectorAdmin::save(), downloadJTLLogs(), and clearJTLLogs() to prevent unauthorized access by low-privilege users. - Add check_admin_referer() to settings save handler - Add wp_nonce_field() to settings form - Add check_ajax_referer() to AJAX log handlers - Pass nonce from JavaScript to AJAX requests - Stream log ZIP download instead of writing to public path - Add security regression tests
…s.org resubmission - Add capability checks and nonce verification to admin endpoints (CVE-2026-9234) - Use timing-safe token comparison via hash_equals() - Escape all output in admin templates (esc_html, esc_attr, esc_url) - Prepare SQL queries with $wpdb->prepare() where possible - Replace external CDN resources with bundled Bootstrap assets - Prefix global functions with jtlwcc_ to avoid collisions - Replace PHP native functions with WordPress alternatives - Add typed constants (const string/int) and bump PHP requirement to 8.3 - Escape exception messages, fix text domains and i18n placeholders - Bump version to 2.4.2, update readme changelog - Add security regression tests (9 tests in AuthorizationTest)
- Add wp_tempnam() and ZipArchive::open() error handling in log download - Clean up orphaned temp files on all code paths - Revert third-party text domains (woocommerce, woocommerce-germanized) - Use WordPress selected() helper in multiselect rendering - Update CI matrix to PHP 8.3 only (matching composer.json requirement) - Fix phpcs alignment violation in ProductController
- Add ordered placeholders (%1$s, %2$s) and translators comment in ProductController - Suppress text domain mismatch false positives for third-party strings (woocommerce, woocommerce-germanized) - Replace is_writable() with empty-string check for wp_tempnam() validation
…th wp_send_json_error() - wp_tempnam() returns string|false at runtime; check for both '' and false - Replace non-standard HTTP 451 'Internal Server Booboo' with wp_send_json_error() using 404 - Add scoped phpstan ignore for wp_tempnam() stub mismatch (stubs type as string)
- Bump WordPress minimum from 5.9 to 6.4 (first WP version with PHP 8.3 support) - Update WC tested up to from 8.2 to 10.8.1 - Align WC minimum to 3.4.7 across readme.txt and plugin header - Add missing Requires at least and Tested up to fields to plugin header
Replace hardcoded 'jtl_connector_link_*' table name strings across 25+ files with typed constants from the new LinkTableNames utility class. This eliminates string duplication, prevents typos, and makes table name references grep-friendly. Also fixes remaining phpcs line-length warnings.
…ilures PHPUnit cannot create test doubles of final classes. Use ReflectionClass::isFinal() to skip them before calling getMockBuilder(), fixing the CI failure caused by the final LinkTableNames class.
…mments Wrap all bare LinkTableNames:: constants in esc_sql() inside $wpdb calls so the Plugin Check sniff recognises them as safe. Merge concatenated __() string in GlobalDataController into a single literal. Restructure ProductController translators/phpcs:ignore comments so both apply to the __() call line. Update phpstan.neon esc_sql ignore count from 9 to 7.
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.
Auto-drafted on push to
task/CO-3478_security_update. Replace this body with details before requesting review.