MDL-35238 Accept $CFG->alternativeupdateproviderurl from config.php file only
There was a potential security risk that someone with access to the Moodle database could update mdl_config table and use it as a vector to install malicious code on the server. Credit goes to Dan Poltawski for raising this.
This commit is contained in:
+2
-2
@@ -987,8 +987,8 @@ class available_update_checker {
|
||||
protected function prepare_request_url() {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->alternativeupdateproviderurl)) {
|
||||
return $CFG->alternativeupdateproviderurl;
|
||||
if (!empty($CFG->config_php_settings['alternativeupdateproviderurl'])) {
|
||||
return $CFG->config_php_settings['alternativeupdateproviderurl'];
|
||||
} else {
|
||||
return 'http://download.moodle.org/api/1.1/updates.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user