Skip to content

Commit eaf1cfd

Browse files
committed
Hardening: Use a properly generated hash for the newbloguser key instead of a determinate substring.
Built from https://develop.svn.wordpress.org/trunk@42258 git-svn-id: http://core.svn.wordpress.org/trunk@42087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent ca6f54c commit eaf1cfd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: wp-admin/user-new.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
$redirect = add_query_arg( array( 'update' => 'could_not_add' ), 'user-new.php' );
7676
}
7777
} else {
78-
$newuser_key = substr( md5( $user_id ), 0, 5 );
78+
$newuser_key = wp_generate_password( 20, false );
7979
add_option( 'new_user_' . $newuser_key, array( 'user_id' => $user_id, 'email' => $user_details->user_email, 'role' => $_REQUEST[ 'role' ] ) );
8080

8181
$roles = get_editable_roles();

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '5.0-alpha-42257';
7+
$wp_version = '5.0-alpha-42258';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)