From c09cfaaff21afdf1fa43aa81327611d3f848e7eb Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 15 Jul 2020 10:05:55 +0300 Subject: Fixed security vulnerabilities. --- wp-content/plugins/dx-users/register-user-class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wp-content/plugins/dx-users/register-user-class.php') diff --git a/wp-content/plugins/dx-users/register-user-class.php b/wp-content/plugins/dx-users/register-user-class.php index 8f0e4c9..bbadf3c 100644 --- a/wp-content/plugins/dx-users/register-user-class.php +++ b/wp-content/plugins/dx-users/register-user-class.php @@ -5,15 +5,15 @@ class RegisterUser { } function process_register_data() { - if( username_exists( $_POST['password'] ) ) { + if( username_exists( sanitize_text_field( $_POST['password'] ) ) ) { wp_die( 'User already exists!' ); } $user_data = array( - 'user_pass' => $_POST['password'], - 'user_login' => $_POST['email'], - 'user_email' => $_POST['email'], - 'display_name' => $_POST['name'], + 'user_pass' => sanitize_text_field( $_POST['password'] ), + 'user_login' => sanitize_text_field( $_POST['email'] ), + 'user_email' => sanitize_text_field( $_POST['email'] ), + 'display_name' => sanitize_text_field( $_POST['name'] ), ); if( ! is_email( $user_data['user_email'] ) ) { -- cgit v1.3.1-26-gb76a