From 60ecca3a09ed40cafae9cd80da681eeb4550caa9 Mon Sep 17 00:00:00 2001 From: skodak Date: Thu, 3 Feb 2005 19:37:11 +0000 Subject: [PATCH] incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged from MOODLE_14_STABLE --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5