use host name in redirect to prevent redirecting to arbitrary pages

This commit is contained in:
Uwe Steinmann 2019-07-30 06:36:34 +02:00
parent 3d5812c86d
commit 90baea95f0

View File

@ -30,5 +30,5 @@ include("../inc/inc.Authentication.php");
$session->setLanguage($_GET['lang']);
header("Location: ".$_GET['referer']);
header("Location: http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$_GET['referer']);
?>