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 | 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)
Note: See
TracTickets for help on using
tickets.
Duplicate of #35658.
Patched in https://core.trac.wordpress.org/attachment/ticket/35658/35658.50.diff.