diff --git a/cached.php b/cached.php index 6793c0499..a716a7aed 100644 --- a/cached.php +++ b/cached.php @@ -11,7 +11,7 @@ $abs = $pwd. "/" .(string)$_GET["f"]; $abs = realpath($abs); if (strncmp($abs, $pwd, strlen($pwd)) != 0) { - header("Location: http://php.net/" . $_GET["f"]); + header("Location: http://php.net/" . strtr($_GET["f"],array("\r"=>"","\n"=>""))); exit; } diff --git a/manual/change.php b/manual/change.php index 3d9dcbc3a..72089f3b9 100644 --- a/manual/change.php +++ b/manual/change.php @@ -3,7 +3,7 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; $page = isset($_GET['page']) ? htmlspecialchars($_GET['page'], ENT_QUOTES, 'UTF-8') : ''; +$page = strtr($page, array("\r"=>"","\n"=>"")); // Redirect to new manual page mirror_redirect("/manual/" . $page); -?> \ No newline at end of file