WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2020 04:06:55 PM (15 months ago)
Author:
whyisjake
Message:

Customize: Add additional filters to Customizer to prevent JSON corruption.
User: Invalidate user_activation_key on password update.
Query: Ensure that only a single post can be returned on date/time based queries.
Block Editor: Coding standards, properly escape class names.
Cache API: Ensure proper escaping around the stats method in the cache API.
Formatting: Expand sanitize_file_name to have better support for utf8 characters.

Brings the changes in [47633], [47634], [47635], [47636], [47637], and [47638] to the 5.1 branch.

Props: aduth, batmoo, ehti, ellatrix, jorgefilipecosta, nickdaugherty, noisysocks, pento, peterwilsoncc, sergeybiryukov, sstoqnov, talldanwp, westi, westonruter, whyisjake, whyisjake, xknown.

Location:
branches/5.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.1

  • branches/5.1/tests/phpunit/tests/user.php

    r44645 r47646  
    978978    }
    979979
    980     function test_changing_email_invalidates_password_reset_key() {
     980    public function test_changing_email_invalidates_password_reset_key() {
    981981        global $wpdb;
    982982
     
    10031003            'user_nicename' => 'cat',
    10041004            'user_email'    => 'foo@bar.dev',
     1005        );
     1006        wp_update_user( $userdata );
     1007
     1008        $user = get_userdata( $user->ID );
     1009        $this->assertEmpty( $user->user_activation_key );
     1010    }
     1011
     1012    public function test_changing_password_invalidates_password_reset_key() {
     1013        global $wpdb;
     1014
     1015        $user = $this->author;
     1016        $wpdb->update( $wpdb->users, array( 'user_activation_key' => 'key' ), array( 'ID' => $user->ID ) );
     1017        clean_user_cache( $user );
     1018
     1019        $user = get_userdata( $user->ID );
     1020        $this->assertEquals( 'key', $user->user_activation_key );
     1021
     1022        $userdata = array(
     1023            'ID'        => $user->ID,
     1024            'user_pass' => 'password',
    10051025        );
    10061026        wp_update_user( $userdata );
Note: See TracChangeset for help on using the changeset viewer.