瀏覽代碼

Fix sanitizing of backtopage

Laurent Destailleur 4 年之前
父節點
當前提交
93b7956156
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      htdocs/core/lib/functions.lib.php

+ 1 - 1
htdocs/core/lib/functions.lib.php

@@ -608,7 +608,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
 
 	// Sanitizing for special parameters. There is no reason to allow the backtopage parameter to contains an external URL.
 	if ($paramname == 'backtopage') {
-		$out = preg_replace(array('/[\\\/][\\\/]+/', '/^[a-z]*:/'), '', $out);
+		$out = preg_replace(array('!(\\\|/)+!', '/^[a-z]*:/'), '', $out);
 	}
 
 	// Code for search criteria persistence.