Skip to content

Commit 518fcad

Browse files
committed
Security: Harden the random aspect of the hash used for network admin email changes.
Replace `mt_rand()` with `wp_rand()` when generating the network admin email confirmation hash, matching the site admin and user profile email change hashes. Developed in: #15267 Props extremsx. Fixes #66426. git-svn-id: https://develop.svn.wordpress.org/trunk@65115 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3ed60aa commit 518fcad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/wp-includes/ms-functions.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,7 +2806,7 @@ function update_network_option_new_admin_email( $old_value, $value ) {
28062806
return;
28072807
}
28082808

2809-
$hash = md5( $value . time() . mt_rand() );
2809+
$hash = md5( $value . time() . wp_rand() );
28102810
$new_admin_email = array(
28112811
'hash' => $hash,
28122812
'newemail' => $value,

0 commit comments

Comments
 (0)