Permalink
Browse files

incorrect use of preg_quote(), add '/' to list of quoted chars - see …

…man page; merged from MOODLE_14_STABLE
  • Loading branch information...
skodak
skodak committed Feb 3, 2005
1 parent f24148e commit 60ecca3a09ed40cafae9cd80da681eeb4550caa9
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
View
@@ -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

0 comments on commit 60ecca3

Please sign in to comment.