Make WordPress Core


Ignore:
Timestamp:
08/01/2014 05:09:53 PM (10 years ago)
Author:
wonderboymusic
Message:

Bail on update_user_meta() when $object_id is non-numeric.

Adds unit test.

Props jacklenox, wonderboymusic.
Fixes #28315.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r28712 r29339  
    138138        return false;
    139139
    140     if ( !$object_id = absint($object_id) )
    141         return false;
     140    if ( ! is_numeric( $object_id ) || ! $object_id = absint( $object_id ) ) {
     141        return false;
     142    }
    142143
    143144    if ( ! $table = _get_meta_table($meta_type) )
Note: See TracChangeset for help on using the changeset viewer.