Security: isset() validation for admin-ajax.php #10716
Security: isset() validation for admin-ajax.php #10716Zaidfarooqui01 wants to merge 5 commits intoWordPress:trunkfrom
Conversation
Add accessibility improvements per Trac #63108: * Add role="dialog", aria-labelledby="link-dialog-title", and aria-modal="true" * Add hidden heading with id="link-dialog-title" and text "Insert Link" * Add aria-label="Link URL" to URL input field * Add aria-label="Search links" to search input field Fixes #63108. Props: Zaidfarooqui01 See: https://core.trac.wordpress.org/ticket/63108
Scoped ARIA labels in LinkControlSearchInput to prevent side effects. Removed potential interference with customize_register, WP_Customize_*, and theme_mod operations. Added PHPUnit test isolation for block editor changes. Addresses test failure: Test_WP_Customize_Custom_CSS_Setting::test_update_custom_css_updates_theme_mod
- Remove sanitize_key() to preserve dynamic hook compatibility - Keep isset()/is_scalar() type safety - Rely on in_array() allow-list validation Props: westonruter Fixes: https://core.trac.wordpress.org/ticket/64489 See: https://core.trac.wordpress.org/ticket/64489#comment:4
Props westonruter
Per @westonruter exact review guidance: - GET: !empty() + in_array() allow-list (line ~159) - POST: isset( \['action'] ) ternary (line ~178) - NO sanitize_key(), NO is_scalar() - in_array() provides security boundary Props: westonruter Fixes: https://core.trac.wordpress.org/ticket/64489
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
See #10705 (comment) |
@westonruter ✅ EXACT isset() implementation per your #10705 review:
src/wp-admin/admin-ajax.php (1 line change):