Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 3 years ago

#20202 closed defect (bug) (fixed)

Filter pre_post_type with sanitize_key()

Reported by: duck_'s profile duck_ Owned by: duck_'s profile duck_
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:


Currently the post_type field is sanitized with sanitize_user(). It would make more sense to use sanitize_key() for this because

  1. register_post_type() uses sanitize_key()
  2. It's a lighter function

See #14910.

Attachments (1)

20202.diff (611 bytes) - added by duck_ 12 years ago.

Download all attachments as: .zip

Change History (3)

12 years ago

#1 @duck_
12 years ago

  • Owner set to duck_
  • Resolution set to fixed
  • Status changed from new to closed

In [20234]:

Pass post_type through sanitize_key() instead of sanitize_user(). Fixes #20202.

For consistency with the registration API and because it does less work.

This ticket was mentioned in Slack in #core-committers by iandunn. View the logs.

3 years ago

Note: See TracTickets for help on using tickets.