MDL-65075 tool_mobile: Check UserAgent only in WS requests

This commit is contained in:
Juan Leyva
2019-04-08 14:13:54 +02:00
parent 102e0828fd
commit cc62967bfc
2 changed files with 7 additions and 5 deletions
-5
View File
@@ -297,11 +297,6 @@ class api {
throw new moodle_exception('enablewsdescription', 'webservice');
}
// Only requests from the Moodle mobile or desktop app. This enhances security to avoid any type of XSS attack.
if (!\core_useragent::is_moodle_app()) {
throw new moodle_exception('apprequired', 'tool_mobile');
}
if (!is_https()) {
throw new moodle_exception('httpsrequired', 'tool_mobile');
}