Automattic / Automattic/jetpack

Sync: Home URLs being incorrectly stored on WordPress.com

Open
#25,949 0 comments 0 reactions 1 assignee Claimed by @zinigor View on GitHub
[Package] Sync [Plugin] Jetpack [Pri] Low Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.