PluginProbe
Patchstack – WordPress & Plugins Security / 2.3.3
Patchstack – WordPress & Plugins Security v2.3.3
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
← All changes | includes/login.php +2 -3 trunk2.3.3 View file →
@@ -39,8 +39,9 @@
39 39 if ( class_exists( 'WooCommerce' ) ) {
40 40 add_action( 'woocommerce_login_form_start', [ $this, 'add_captcha' ] );
41 41 add_action( 'woocommerce_register_form_start', [ $this, 'add_captcha' ] );
42 42 add_action( 'wp_authenticate', [ $this, 'add_captcha' ] );
43 + add_filter( 'woocommerce_process_registration_errors', [$this, 'general_captcha_check' ], 10, 1 );
43 44 add_action( 'woocommerce_before_lost_password_form', [ $this, 'add_captcha' ] );
44 45 }
45 46
46 47 // 2FA related actions.
@@ -174,10 +175,9 @@
174 175
175 176 // Verify the code.
176 177 require_once dirname( __FILE__ ) . '/2fa/rfc6238.php';
177 178 $secret = $this->tfa_get_secret( $user );
178 - $code = isset( $_POST['patchstack_2fa_secretkey_verification'] ) ? trim( $_POST['patchstack_2fa_secretkey_verification'] ) : '';
179 - if ( ! TokenAuth6238::verify( $secret, $code ) ) {
179 + if ( ! TokenAuth6238::verify( $secret, trim( $_POST['patchstack_2fa_secretkey_verification'] ) ) ) {
180 180 wc_add_notice( __( 'The 2FA authentication code you entered is invalid.', 'patchstack' ), 'error' );
181 181 return;
182 182 }
183 183
@@ -329,9 +329,8 @@
329 329 if ( $this->get_option( 'patchstack_captcha_registration_form' ) ) {
330 330 add_action( 'register_form', [ $this->plugin->hardening, 'captcha_display' ] );
331 331 add_action( 'woocommerce_register_form', [ $this->plugin->hardening, 'captcha_display' ] );
332 332 add_action( 'registration_errors', [ $this, 'general_captcha_check' ] );
333 - add_filter( 'woocommerce_process_registration_errors', [$this, 'general_captcha_check' ], 10, 1 );
334 333 }
335 334
336 335 // reCAPTCHA on the reset password form.
337 336 if ( $this->get_option( 'patchstack_captcha_reset_pwd_form' ) ) {