mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Hardening: Use a properly generated hash for the newbloguser
key instead of a determinate substring.
Merges [42258] to the 4.3 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.3@42288 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c60e988ffb
commit
9ecf1ec6ba
@ -74,7 +74,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
|
||||
add_existing_user_to_blog( array( 'user_id' => $user_id, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
$redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' );
|
||||
} else {
|
||||
$newuser_key = substr( md5( $user_id ), 0, 5 );
|
||||
$newuser_key = wp_generate_password( 20, false );
|
||||
add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
|
||||
|
||||
$roles = get_editable_roles();
|
||||
|
Loading…
x
Reference in New Issue
Block a user