Skip to content
Permalink
Browse files

Hardening: Use a properly generated hash for the `newbloguser` key in…

…stead 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
  • Loading branch information...
johnbillion committed Nov 29, 2017
1 parent ca6f54c commit eaf1cfdc1fe0bdffabd8d879c591b864d833326c
Showing with 2 additions and 2 deletions.
  1. +1 −1 wp-admin/user-new.php
  2. +1 −1 wp-includes/version.php
@@ -75,7 +75,7 @@
$redirect = add_query_arg( array( 'update' => 'could_not_add' ), '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();
@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42257';
$wp_version = '5.0-alpha-42258';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 comments on commit eaf1cfd

Please sign in to comment.
You can’t perform that action at this time.