web: fix the mechanism for forwarding to original page after login.

This commit is contained in:
David Anderson 2015-12-01 23:49:31 -08:00
parent 985ec15dfe
commit 9a4a26e898
2 changed files with 4 additions and 1 deletions

View File

@ -133,6 +133,7 @@ if ($id && $t && $h) {
}
$next_url = post_str("next_url", true);
$next_url = urldecode($next_url);
$next_url = sanitize_local_url($next_url);
if (strlen($next_url) == 0) $next_url = "home.php";

View File

@ -22,8 +22,10 @@ require_once("../inc/account.inc");
check_get_args(array("next_url"));
$next_url = sanitize_local_url(get_str('next_url', true));
$next_url = get_str('next_url', true);
$next_url = urldecode($next_url);
$next_url = sanitize_local_url($next_url);
$next_url = urlencode($next_url);
$u = "login_form.php?next_url=".$next_url;
redirect_to_secure_url($u);