Skip to content
Browse files

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

…man page
  • Loading branch information...
1 parent 5fa3273 commit c3431d2f523c9399b807d288446f1a8f5d5d5e78 skodak committed Feb 3, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
View
2 lib/moodlelib.php
@@ -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

0 comments on commit c3431d2

Please sign in to comment.
Something went wrong with that request. Please try again.