From: skodak Date: Fri, 26 May 2006 11:54:11 +0000 (+0000) Subject: sanitize submitted numerical values; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9054ba924af37661e5878afad4e9f97fb411d987;p=moodle.git sanitize submitted numerical values; merged from MOODLE_16_STABLE --- diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index be729b8212..75437ec5ac 100755 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -65,6 +65,10 @@ function scorm_add_instance($scorm) { $scorm->width = str_replace('%','',$scorm->width); $scorm->height = str_replace('%','',$scorm->height); + //sanitize submitted values a bit + $scorm->width = clean_param($scorm->width, PARAM_INT); + $scorm->height = clean_param($scorm->height, PARAM_INT); + $id = insert_record('scorm', $scorm); if (basename($scorm->reference) != 'imsmanifest.xml') {