From bcfe711544f03789ba1aade6dddb3b2009bb3781 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Mar 2021 19:20:34 +0100 Subject: [PATCH] Fix redirect to extern url --- 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 710cb4fe87c..469b99dd75e 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -613,7 +613,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 = str_replace('\\', '/', $out); - $out = preg_replace(array('/^\/\/+/', '/^[a-z]*:/i'), '', $out); + $out = preg_replace(array('/^:*\/\/+/', '/^[a-z]*:+/i'), '', $out); } // Code for search criteria persistence.