mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +00:00
Bail on update_user_meta() when $object_id is non-numeric.
Adds unit test. Props jacklenox, wonderboymusic. Fixes #28315. git-svn-id: https://develop.svn.wordpress.org/trunk@29339 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -137,8 +137,9 @@ function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_v
|
||||
if ( !$meta_type || !$meta_key )
|
||||
return false;
|
||||
|
||||
if ( !$object_id = absint($object_id) )
|
||||
if ( ! is_numeric( $object_id ) || ! $object_id = absint( $object_id ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! $table = _get_meta_table($meta_type) )
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user