Prevent a PHP notice from appearing on `wp-login.php?action=postpass` when there's no `$_POST['post_password']` parameter. Redirects to the referer if there is one (if there isn't one it'll just exit with a blank screen; no need for a user-friendly error message here).
Fixes #34160 Props iamfriendly Built from https://develop.svn.wordpress.org/trunk@34909 git-svn-id: http://core.svn.wordpress.org/trunk@34874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3baa1336ec
commit
2d745fabe3
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34908';
|
$wp_version = '4.4-alpha-34909';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -472,6 +472,11 @@ $interim_login = isset($_REQUEST['interim-login']);
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
|
|
||||||
case 'postpass' :
|
case 'postpass' :
|
||||||
|
if ( ! array_key_exists( 'post_password', $_POST ) ) {
|
||||||
|
wp_safe_redirect( wp_get_referer() );
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
require_once ABSPATH . WPINC . '/class-phpass.php';
|
require_once ABSPATH . WPINC . '/class-phpass.php';
|
||||||
$hasher = new PasswordHash( 8, true );
|
$hasher = new PasswordHash( 8, true );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue