From: ArthurHoaro Date: Mon, 21 Mar 2016 18:06:46 +0000 (+0100) Subject: Use generateLocation to set the redirection in login (and don't escape the url) X-Git-Tag: v0.7.0~24^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=e15f08d72a7e5f697fe4d64f1bd48465052ca115;p=github%2Fshaarli%2FShaarli.git Use generateLocation to set the redirection in login (and don't escape the url) --- diff --git a/index.php b/index.php index 850b350e..27db10ba 100644 --- a/index.php +++ b/index.php @@ -483,7 +483,7 @@ if (isset($_POST['login'])) if (isset($_POST['returnurl'])) { // Prevent loops over login screen. if (strpos($_POST['returnurl'], 'do=login') === false) { - header('Location: '. escape($_POST['returnurl'])); + header('Location: '. generateLocation($_POST['returnurl'], $_SERVER['HTTP_HOST'])); exit; } }