Skip to content

Draft: task/CO-3478_security_update - #49

Open
github-actions[bot] wants to merge 12 commits into
developfrom
task/CO-3478_security_update
Open

Draft: task/CO-3478_security_update#49
github-actions[bot] wants to merge 12 commits into
developfrom
task/CO-3478_security_update

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Auto-drafted on push to task/CO-3478_security_update. Replace this body with details before requesting review.

…-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.
@AndreasKempeJTL
Andreas Kempe (AndreasKempeJTL) changed the base branch from master to develop June 25, 2026 12:13
@AndreasKempeJTL
Andreas Kempe (AndreasKempeJTL) marked this pull request as ready for review June 25, 2026 14:53
@AndreasKempeJTL
Andreas Kempe (AndreasKempeJTL) requested a review from a team as a code owner June 25, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants