Make WordPress Core


Ignore:
Timestamp:
07/10/2016 07:42:02 PM (9 years ago)
Author:
ocean90
Message:

Multisite: Use hash_equals() when comparing hashes to mitigate timing attacks.

Fixes #37324.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options.php

    r38006 r38032  
    5858        $new_admin_details = get_option( 'adminhash' );
    5959        $redirect = 'options-general.php?updated=false';
    60         if ( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && !empty($new_admin_details[ 'newemail' ]) ) {
     60        if ( is_array( $new_admin_details ) && hash_equals( $new_admin_details[ 'hash' ], $_GET[ 'adminhash' ] ) && !empty($new_admin_details[ 'newemail' ]) ) {
    6161            update_option( 'admin_email', $new_admin_details[ 'newemail' ] );
    6262            delete_option( 'adminhash' );
Note: See TracChangeset for help on using the changeset viewer.