From 93b79561562887711d0d0c3751c4b9f279b6f9ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 19 Sep 2020 02:12:08 +0200 Subject: [PATCH] Fix sanitizing of backtopage --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 51fb7ef62ea..404bbc81ccc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/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.