From: skodak Date: Thu, 3 Feb 2005 19:37:11 +0000 (+0000) Subject: incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=60ecca3a09ed40cafae9cd80da681eeb4550caa9;p=moodle.git incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged from MOODLE_14_STABLE --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 3c8df90eb0..2b73ec9d62 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -291,7 +291,7 @@ function clean_param($param, $options) { if (!empty($param)) { if (preg_match(':^/:', $param)) { // root-relative, ok! - } elseif (preg_match('/^'.preg_quote($CFG->wwwroot).'/i',$param)) { + } elseif (preg_match('/^'.preg_quote($CFG->wwwroot, '/').'/i',$param)) { // absolute, and matches our wwwroot } else { // relative - let's make sure there are no tricks