Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#26199 closed enhancement (fixed)

Pass original value to sanitize_option_* filter

Reported by: simonwheatley's profile simonwheatley Owned by: chriscct7's profile chriscct7
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.2
Component: Options, Meta APIs Keywords: has-patch
Focuses: Cc:

Description

Currently the sanitize_option_{$option_name} filter differs from other esc and sanitization filters in that it does not pass the original value. It should.

Attachments (4)

26199.diff (615 bytes) - added by simonwheatley 11 years ago.
Adds the original value to the sanitize_option_* filter (now without my dirty test which breaks TwentyThirteen)
26199.2.diff (772 bytes) - added by simonwheatley 10 years ago.
Refreshed for 4.0a trunk
26199.3.diff (772 bytes) - added by MikeHansenMe 10 years ago.
refreshed for 4.1
26199.4.diff (878 bytes) - added by MikeHansenMe 9 years ago.
Refreshed for 4.3

Download all attachments as: .zip

Change History (10)

@simonwheatley
11 years ago

Adds the original value to the sanitize_option_* filter (now without my dirty test which breaks TwentyThirteen)

#1 @SergeyBiryukov
11 years ago

  • Keywords 3.9-early added
  • Milestone changed from Awaiting Review to Future Release

@simonwheatley
10 years ago

Refreshed for 4.0a trunk

#2 @simonwheatley
10 years ago

I've refreshed the patch:

  • The intended effect still works (original value passed as a third parameter)
  • Four unit tests fail, see below, but these appear unrelated
Version 0, edited 10 years ago by simonwheatley (next)

@MikeHansenMe
10 years ago

refreshed for 4.1

#3 @chriscct7
9 years ago

  • Keywords 3.9-early removed
  • Owner set to chriscct7
  • Severity changed from minor to normal
  • Status changed from new to reviewing
  • Version changed from 3.2.1 to 3.2

@MikeHansenMe
9 years ago

Refreshed for 4.3

#4 @MikeHansenMe
9 years ago

Refreshed the patch for 4.3.

#5 @boonebgorges
9 years ago

  • Component changed from Security to Options, Meta APIs
  • Milestone changed from Future Release to 4.3

#6 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 32520:

In sanitize_option(), pass the unsanitized $value to the filter.

Props simonwheatley, MikeHansenMe.
Fixes #26199.

Note: See TracTickets for help on using tickets.