Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37403 closed defect (bug) (duplicate)

register_meta function does not properly check variable type or key existence (of an array variable) before use

Reported by: chriscct7's profile chriscct7 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords:
Focuses: Cc:

Description

In the register_meta function, there are several cases where variables are allowed to be filtered, for example the $args parameter via the register_meta_args filter. However, once that filter is called, further down in the function, there are cases where the object type or existence of a key isn't checked before being used, allowing for a fatal error for example in the

if ( is_callable( $args['sanitize_callback'] ) ) { or if ( is_callable( $args['auth_callback'] ) ) { or if ( $has_old_sanitize_cb && is_callable( $args['sanitize_callback'] ) ) { lines

Change History (1)

#1 @ocean90
8 years ago

  • Keywords needs-patch removed
  • Milestone 4.6 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.