Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account Protection: Fix Brute force protection account recovery conflict #41739

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ public function login_form_password_detection( $user, string $password ) {
return $user;
}

// Skip if we're validating a Brute force protection recovery token
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['validate_jetpack_protect_recovery'] ) ) {
return $user;
}

if ( $this->validation_service->is_weak_password( $password ) ) {
// TODO: Every time the user logs in we generate a new token based transient. This might not be ideal.
$transient = $this->generate_and_store_transient_data( $user->ID );

$email_sent = $this->email_service->api_send_auth_email( $user, $transient['auth_code'] );
Expand Down
Loading