diff --git a/inc/class-otpa-user-info.php b/inc/class-otpa-user-info.php index 956e250..666f7cb 100644 --- a/inc/class-otpa-user-info.php +++ b/inc/class-otpa-user-info.php @@ -49,7 +49,7 @@ public function user_profile_form_alter( $user ) { public function registration_form_validate( $errors, $sanitized_user_login, $user_email ) { if ( is_admin() ) { - $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_SANITIZE_STRING ); + $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_UNSAFE_RAW ); $errors = $this->validate_default_otp_info( $identifier, $errors ); } @@ -67,7 +67,7 @@ public function admin_registration_form_alter( $operation ) { } public function registration_form_alter() { - $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_SANITIZE_STRING ); + $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_UNSAFE_RAW ); echo $this->get_otp_info_markup( $identifier ); // @codingStandardsIgnoreLine } @@ -79,7 +79,7 @@ public function user_info_form_validate( $errors, $update, $user ) { } public function save_user_info( $user_id, $old_user_data = false ) { - $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_SANITIZE_STRING ); + $identifier = filter_input( INPUT_POST, 'otp_identifier', FILTER_DEFAULT ); if ( is_a( $old_user_data, 'WP_User' ) ) {