Skip to content

[PCP] Phase 4: MissingUnslash for $_POST#239

Open
faisalahammad wants to merge 1 commit into
WordPress:trunkfrom
faisalahammad:fix/pcp-phase-4-missing-unslash
Open

[PCP] Phase 4: MissingUnslash for $_POST#239
faisalahammad wants to merge 1 commit into
WordPress:trunkfrom
faisalahammad:fix/pcp-phase-4-missing-unslash

Conversation

@faisalahammad

@faisalahammad faisalahammad commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fix: WordPress.Security.ValidatedSanitizedInput.MissingUnslash (lines 394, 402, 535, 649)

Changes

  • Line 394: Wrap $_POST['classic-editor-user-settings'] with wp_unslash() before wp_verify_nonce()
  • Line 402: Wrap $_POST['classic-editor-replace'] with wp_unslash() before self::validate_option_editor()
  • Line 535: Wrap $_POST['classic-editor-network-settings'] with wp_unslash() before wp_verify_nonce()
  • Line 649: Wrap $_POST['_wp_http_referer'] with wp_unslash() before strpos()

All existing phpcs:ignore annotations preserved; only wp_unslash() wrapping added.

Rule code

WordPress.Security.ValidatedSanitizedInput.MissingUnslash

Verification

  • PHPCS with WordPress standard: zero violations for MissingUnslash

…, 535, 649)

Wrap  values with wp_unslash() before nonce verification and string operations.
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.

1 participant