-
Notifications
You must be signed in to change notification settings - Fork 416
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
Adjusting data sent to api.wordpress.org #578
Comments
As well as removing the entry from the |
It seems there are two separate issues here. Legal: PUC doesn't send that data to Technical: I thought about this suggestion for a bit and couldn't come up with any practical drawbacks. I would be willing to merge something like this. It might be nice to include a custom filter that can turn off this behaviour since it's technically a backwards-incompatible change, but I'm not sure even that's necessary. I don't recall anyone actually wanting to still include their plugin in the default update requests while they're using PUC. |
Hi, Thank you. Yes, whether it's a legal issue for anyone isn't really our question. Like you, I've been working with WP plugins for a long time, and I can't think of why anyone would need this info to be included when they're using an external updates server. Here's a PR: #579 N.B. I've never developed any custom themes, and don't have a testing environment for that. The above code worked for me in my plugins. And if someone wants some mu-plugin code to filter this for all third-party plugins and themes on their site unconditionally (whether active or not), then this should work:
David |
Thanks for merging. Since there's not been a release since February, any chance of one happening in the near future so that we can pull in all the commits since then without needing to use master? |
I refactored some things, adjusted code style, and hopefully improved theme-related compatibility. It probably needs more testing. If you have time, take a look / try it out. And sure, if I don't forget, I'll make a release later this week. |
Thank you! Only 3 minor comments:
|
Regarding precise checks: To me, this is a compatibility concern. Heuristics like "change only what you meant to change" and "minimize impact area". Sure, the additional checks are probably not necessary. But why leave extra room for errors when there's an easy way to avoid at least some? I don't want PUC to randomly start breaking things on people's sites if two years from now wordpress.org suddenly introduces a new search API that uses a field like As for the new filter name, I'm not entirely happy about it either. I thought the original was too generic, so the new one mentions an "update check" which is performed by "core" (and the API is an |
I haven't looked at and have no experience with the data format for themes. For plugins, the whole Ah, I see, core as in WordPress core performing the check; I didn't think of that. Yes, I think your new suggestion is a good one. |
A new release that includes this change is out now. |
Thanks; I've tested it (plugins only), and it works for me. |
Thanks to both for you for suggesting/making this change. With all the issues coming out around Matt/WPE recently, it is a good move to limit unnecessary data being sent to wordpress.org. |
All right, I'll close this as completed. If you run into any bugs with this implementation, feel free to reopen or create a new issue. |
Hi Yahnis,
It seems to me that when a plugin's updates are being handled by this class, the plugin's data should be stripped from what is sent to
https://api.wordpress.org/plugins/update-check/(version)
in the built-in WordPress plugin updates check.This avoids any issues from wordpress.org's API sending back unwanted/clashing data, and also deals with the unwanted data leak (for most people, I'd assume; for some websites depending on the nature of the website it might be considered a GDPR or other privacy-law issue; and commercial plugin vendors might also consider it an unwanted leak of their full active customer list) of a list of their non-wordpress.org plugins being sent to wordpress.org.
So, I'd propose that an appropriate hook be used to remove the entry for plugins using the class, since api.wordpress.org does not need to receive that information. In the call to the above URL, in the body (of the
POST
request), there's aplugins
key, which is itself an array. The array key is the plugin relative path.I'm happy to create a patch if it's something you'd consider merging.
David
The text was updated successfully, but these errors were encountered: