Merge branch 'mdl85075-51' of https://github.com/matthewhilton/moodle into MOODLE_501_STABLE

This commit is contained in:
Huong Nguyen
2025-10-29 09:31:09 +07:00
+9 -7
View File
@@ -3713,6 +3713,15 @@ class curl {
return null;
}
// Check if the URL is blocked in core curl_security_helper or
// curl security helper that passed to curl class constructor.
// Note, we purposely check the configured helper first,
// as this may be being mocked for unit testing.
if ($this->securityhelper->url_is_blocked($url)) {
$this->error = $this->securityhelper->get_blocked_url_string();
return $this->error;
}
// Augment all installed plugin's security helpers if there is any.
// The plugin's function has to be defined as plugintype_pluginname_curl_security_helper in pluginname/lib.php.
$plugintypes = get_plugins_with_function('curl_security_helper');
@@ -3731,13 +3740,6 @@ class curl {
}
}
// Check if the URL is blocked in core curl_security_helper or
// curl security helper that passed to curl class constructor.
if ($this->securityhelper->url_is_blocked($url)) {
$this->error = $this->securityhelper->get_blocked_url_string();
return $this->error;
}
// Set allowed resolve info if the URL is not blocked.
$this->curlresolveinfo = $this->securityhelper->get_resolve_info();