Fix/31582 special characters in password on checkout page lead to not working account (#43777)
* Fix registration during checkout * Added changelog. * Moved changelog. * Added correct spacing * Move password slashing into WC_Checkout:get_posted_data() * Lint fix
This commit is contained in:
parent
c704ae2cab
commit
1e815751ab
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
Fixed a bug affecting registration during checkout that would prevent a new user from logging in.
|
|
@ -783,6 +783,9 @@ class WC_Checkout {
|
|||
$value = wc_sanitize_textarea( $value );
|
||||
break;
|
||||
case 'password':
|
||||
if ( $data['createaccount'] && 'account_password' === $key ) {
|
||||
$value = wp_slash( $value ); // Passwords are encrypted with slashes on account creation, so we need to slash here too.
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$value = wc_clean( $value );
|
||||
|
|
Loading…
Reference in New Issue