Skip to content

Upgrade/Install: Don't send plugins and themes with a non-WordPress.org Update URI to the update-check APIs - #13928

Open
georgestephanis wants to merge 1 commit into
WordPress:trunkfrom
georgestephanis:fix/59631-skip-update-uri-plugins
Open

georgestephanis wants to merge 1 commit into
WordPress:trunkfrom
georgestephanis:fix/59631-skip-update-uri-plugins

Conversation

@georgestephanis

Copy link
Copy Markdown

Plugins and themes whose Update URI header points outside WordPress.org can never receive an update from WordPress.org, but wp_update_plugins() and wp_update_themes() still send them, headers included, to api.wordpress.org. That discloses private and premium plugin/theme lists to a third party, which is a privacy (and potentially GDPR) concern for sites and for plugin vendors.

This omits any plugin or theme whose Update URI is set to something other than a WordPress.org URL, using the forms described in #950 (https://wordpress.org/{plugins,themes}/{slug}/ and w.org/{plugins,themes}/{slug}) as the "hosted on WordPress.org" patterns.

  • New private helper _wp_is_wporg_update_uri() decides whether a header value identifies a WordPress.org hosted item. It is deliberately permissive: if in doubt the item is still sent, which is today's behaviour.
  • wp_update_plugins() builds its payload (and the active list) from the remaining plugins only.
  • wp_update_themes() does the same. If the active theme is omitted, active is dropped too so its slug isn't disclosed.
  • Omitted items are still recorded in checked and still pass through update_plugins_{$hostname} / update_themes_{$hostname}, so third-party updaters are unaffected.

Not changed: the translations payload, which is keyed by text domain and still includes entries for omitted items. That can be a follow-up.

Open question: I could not verify server-side behaviour of the API (it isn't open source), including whether the themes endpoint tolerates a request with no active key.

Trac ticket: https://core.trac.wordpress.org/ticket/59631

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5.5
Used for: Drafted the implementation, the PHPUnit tests, and this description. The work was done under the direction of a human, who reviewed the changes and takes responsibility for them.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

🤖 Generated with Claude Code

…rg `Update URI` to the update-check APIs.

Plugins and themes whose `Update URI` header points outside WordPress.org can never receive an update from WordPress.org, but `wp_update_plugins()` and `wp_update_themes()` still disclosed them, headers included, to api.wordpress.org.

Omit any item whose `Update URI` is not a WordPress.org URL (`https://wordpress.org/{plugins,themes}/{slug}/` or `w.org/{plugins,themes}/{slug}`). Omitted items are still recorded as checked and still pass through the `update_plugins_{$hostname}` and `update_themes_{$hostname}` filters.

See #59631.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props georgestephanis.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@georgestephanis
georgestephanis requested a review from dd32 October 2, 2026 15:01
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@georgestephanis

Copy link
Copy Markdown
Author

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

oof, rate limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants