mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
Login and Registration: Check that the $_POST values are strings in wp_signon().
This prevents a fatal error from `trim()` via `wp_authenticate()` if an array is passed instead. Follow-up to [6643], [58093]. Props leedxw, audrasjb, SergeyBiryukov. Fixes #62794. Built from https://develop.svn.wordpress.org/trunk@59595 git-svn-id: http://core.svn.wordpress.org/trunk@58981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0086f4ba40
commit
504d02539f
|
|
@ -48,10 +48,10 @@ function wp_signon( $credentials = array(), $secure_cookie = '' ) {
|
|||
'remember' => false,
|
||||
);
|
||||
|
||||
if ( ! empty( $_POST['log'] ) ) {
|
||||
if ( ! empty( $_POST['log'] ) && is_string( $_POST['log'] ) ) {
|
||||
$credentials['user_login'] = wp_unslash( $_POST['log'] );
|
||||
}
|
||||
if ( ! empty( $_POST['pwd'] ) ) {
|
||||
if ( ! empty( $_POST['pwd'] ) && is_string( $_POST['pwd'] ) ) {
|
||||
$credentials['user_password'] = $_POST['pwd'];
|
||||
}
|
||||
if ( ! empty( $_POST['rememberme'] ) ) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59594';
|
||||
$wp_version = '6.8-alpha-59595';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user