Account Protection locks users out of local WordPress Studio sites (Offline Mode)

Open
#55,069 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php, wordpress

Research direction

Start by tracing the Account Protection login check and the email flow through Email_Service::api_send_auth_email(), then find how Jetpack detects Offline Mode. Reproduce the lockout on a local Studio site using a password on the leak list. Done means offline sites or failed verification email delivery no longer block the user’s login.

Written by the indexing model from the issue text.

Description

Bug Needs triage
Impacted plugin

Jetpack

Quick summary

On a local WordPress Studio site, where Jetpack runs in Offline Mode, Account Protection blocks logins it can't complete. When a password is on the leak list, the "Verify your identity" screen asks for an emailed code and shows "User not found." The code is sent through the WordPress.com API (Email_Service::api_send_auth_email()), which an offline Studio site can't reach, so it never arrives and the user is locked out of their own local site. This happens on the WordPress.org release (16.4) and on the WordPress.com build (16.5-a.3).

image
Steps to reproduce
  1. Clone a live site that has Account Protection turned on to a local environment, such as WordPress Studio on localhost, so Jetpack runs in Offline Mode.
  2. Log out.
  3. Log in with a password that's on the leak list. In my case it was Studio's default admin user, admin/123.
  4. The "Verify your identity" screen appears with the error "User not found." No email arrives, and there's no way past the screen.

Expected: Skip password detection when the site is in Offline Mode, or when the verification email can't be sent, instead of blocking the login.

Site owner impact

Fewer than 20% of the total website/platform users

Severity

Major

What other impact(s) does this issue have?

No revenue impact

If a workaround is available, please outline it here.
  • Add define( 'DISABLE_JETPACK_ACCOUNT_PROTECTION', true ); to wp-config.php.
  • Or log in with the auto-login from Studio's "WP Admin" button, which skips the login form.
Platform (Simple and/or Atomic)

Self-hosted

Dominant language
PHP
Stars
1.9k
Forks
913
Avg merge
1d 18h
Merged PRs (30d)
809

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/jetpack

All issues in Automattic/jetpack

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.