jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Sync: Home URLs being incorrectly stored on WordPress.com

Open coder-karen opened this issue 3 years ago • 0 comments

Impacted plugin

Jetpack

Steps to Reproduce

This issue isn't reproducible as such, the issue being created to to help identify what results in the issue itself, in order to fix it.

The issue is that some sites appear to have their WordPress.com home URLs changed (to http://no in most cases, http://1 in another spotted case). It's unclear what causes this, but there are two side effects:

  • The user's activity log shows an entry saying that the website address (home URL) has changed:
Screenshot 2022-08-31 at 11 33 07
  • The changed home URL on the WordPress.com side seems to result in an identity crisis, putting the site in safe mode and in effect breaking the site's Jetpack connection. This identity crisis was reported by one customer, and noted in several blog report cards when investigating the issue.

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Browser

No response

Other information

There are more details including logstash / Kibana links in this internal post: p9dueE-5CZ-p2

The original issue where this came up: 7641-gh-Automattic/jpop-issues

Logging has been added, to show examples of sites switching to broken URLs: p9dueE-5CZ-p2#comment-8415


Next steps

In the post, it was suggested that something is triggering those URL updates from the remote site and sync is attempting to do its job but perhaps without validation of the value before it's accepted as a URL.

Possibly the only sanitization done (before the values are stored) is happening in the line of code mentioned here: p9dueE-5CZ-p2#comment-8427

Some questions as a result:

  • Is there a legitimate case for wanting non-URLs stored there?
  • What kind of setups could enable this?
  • Are there some WordPress flows - for example wp-CLI - where either we or WordPress are mixing up the home and siteurl values remotely?

Platform (Simple, Atomic, or both?)

Self-hosted

Reproducibility

Intermittent

Severity

Some (< 50%)

Available workarounds?

No response

Workaround details

No response

coder-karen avatar Aug 31 '22 10:08 coder-karen