MDL-63717 tool_mobile: Ensure URLs are valid

We need to clean the URLs returned by the get_public_config WS because some old plugins didn't validate the stored data.
This commit is contained in:
Juan Leyva
2018-11-02 14:37:29 +01:00
parent d1d7d1396a
commit 818d40a922
+2 -2
View File
@@ -194,10 +194,10 @@ class api {
// Check that we are receiving a moodle_url object, themes can override get_logo_url and may return incorrect values.
if (($logourl = $OUTPUT->get_logo_url()) && $logourl instanceof moodle_url) {
$settings['logourl'] = $logourl->out(false);
$settings['logourl'] = clean_param($logourl->out(false), PARAM_URL);
}
if (($compactlogourl = $OUTPUT->get_compact_logo_url()) && $compactlogourl instanceof moodle_url) {
$settings['compactlogourl'] = $compactlogourl->out(false);
$settings['compactlogourl'] = clean_param($compactlogourl->out(false), PARAM_URL);
}
// Identity providers.