Skip to content

Commit

Permalink
incorrect use of preg_quote(), add '/' to list of quoted chars - see …
Browse files Browse the repository at this point in the history
…man page
  • Loading branch information
skodak committed Feb 3, 2005
1 parent 5fa3273 commit c3431d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/moodlelib.php
Expand Up @@ -206,7 +206,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
Expand Down

0 comments on commit c3431d2

Please sign in to comment.