Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.5.12, 3.6.10, 3.7.6, 3.8.3
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
MOODLE_38_STABLE
-
-
International 4.0 - Sprint 1
Description
The admin config changes report (Site admin > Reports > Config changes) accepts a "dir" GET parameter to determine whether to order the report by ASC or DESC. The problem with its implementation is that it injects an alpha filtered version of that value directly into the SQL, instead of using logical operators to insert a predefined string of ASC or DESC.
Since it does only allow alphabet characers (along with its position in the query), I don't think its susceptible to malicious SQL injection, the result will just be that the query will be rendered invalid and cause an error on the page. I have, however, set this to "could be a security issue" for the time being, pending whoever takes the issue doing some further investigation.
Note: The "dir" parameter has been removed from Moodle 3.9, so that version and later are not affected.
(Prepared by michaelh based on report by Spyridon Chatzimichail, SF case 00076304)