Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/07/2013 11:45:58 PM (13 years ago)
Author:
boonebgorges
Message:

Audit of parameter sanitization in Groups and Core database classes

  • Uses wp_parse_id_list() to sanitize parameters of integer arrays
  • Implements a more consistent approach to LIKE clause sanitization

Props johnjamesjacoby

Introduces a number of unit tests for the Groups and Core database classes, to
accompany the security hardening.

See #4989

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/includes/testcase.php

    r6932 r7015  
    137137     * directory queries. This is a shorthand wrapper for the user factory
    138138     * create() method.
     139     *
     140     * Also set a display name
    139141     */
    140142    function create_user( $args = array() ) {
     
    151153        update_user_meta( $user_id, 'last_activity', $last_activity );
    152154
     155        if ( bp_is_active( 'xprofile' ) ) {
     156            $user = new WP_User( $user_id );
     157            xprofile_set_field_data( 1, $user_id, $user->display_name );
     158        }
     159
    153160        return $user_id;
    154161    }
Note: See TracChangeset for help on using the changeset viewer.