]> git.mjollnir.org Git - moodle.git/commitdiff
incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged...
authorskodak <skodak>
Thu, 3 Feb 2005 19:37:11 +0000 (19:37 +0000)
committerskodak <skodak>
Thu, 3 Feb 2005 19:37:11 +0000 (19:37 +0000)
lib/moodlelib.php

index 3c8df90eb0ca73bb42ef9781c37c38d7da89cdef..2b73ec9d620c3a4cf17d2c6a5f7d846290d38567 100644 (file)
@@ -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