From 9054ba924af37661e5878afad4e9f97fb411d987 Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 26 May 2006 11:54:11 +0000 Subject: [PATCH] sanitize submitted numerical values; merged from MOODLE_16_STABLE --- mod/scorm/lib.php | 4 ++++ 1 file changed, 4 insertions(+) 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') { -- 2.39.5