Fix redirect to bookmark only if not external link

This commit is contained in:
Laurent Destailleur 2017-10-12 17:12:42 +02:00
parent 1fba58b9ce
commit 074eda016b

View File

@ -65,7 +65,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
if (GETPOST('cancel','alpha'))
{
if (empty($backtopage)) $backtopage=($urlsource?$urlsource:((! empty($url))?$url:DOL_URL_ROOT.'/bookmarks/list.php'));
if (empty($backtopage)) $backtopage=($urlsource?$urlsource:((! empty($url) && ! preg_match('/^http/i', $url))?$url:DOL_URL_ROOT.'/bookmarks/list.php'));
header("Location: ".$backtopage);
exit;
}