Permalink
Browse files

MDL-7699 Fixed redirect() to ../../

  • Loading branch information...
1 parent 49eacbe commit 23ff199c26d9d98ad9d420be1f616130c3fb2599 dwoolhead committed Nov 27, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/weblib.php
View
@@ -4721,7 +4721,7 @@ function redirect($url, $message='', $delay=-1) {
}
// Replace all ..s
while (true) {
- $newurl = preg_replace('|/[^/]*/\.\./|', '/', $url);
+ $newurl = preg_replace('|/(?!\.\.)[^/]*/\.\./|', '/', $url);
if ($newurl == $url) {
break;
}

0 comments on commit 23ff199

Please sign in to comment.