-
Notifications
You must be signed in to change notification settings - Fork 177
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
Is it possible to add a list of domains to update? #106
Comments
There's no built-in feature like that, but you could probably implement it by either creating your own subclass of Just keep in mind that when a site sends an update request, it can technically put anything it wants in the request. For example, site A could easily pretend to be site B unless you come up with some clever verification scheme. |
Please explain how can I do this and modify the code |
Here are some general pointers:
So something like this: class ExampleUpdateServer extends Wpup_UpdateServer {
protected function checkAuthorization($request) {
parent::checkAuthorization($request);
$detectedUrl = $request->wpSiteUrl;
if (!$this->isAllowedUrl($detectedUrl)) {
$this->exitWithError('Site URL not allowed', 403);
}
}
private function isAllowedUrl($siteUrl) {
/* ... */
return true;
}
} And then modify |
I tried to do these modifications but it didn't work for me |
This is not intended to be a complete solution, just a partial example that demonstrates how to do it. You'll need to be sufficiently familiar with PHP to fill in the gaps. But to expand on my earlier comments:
|
Is it possible to add a list of domains that are allowed to take updates to the update server?
So that only sites on the allowed list can be updated؟
The text was updated successfully, but these errors were encountered: