Revert "login: only allow relative URLs in return="

This reverts commit c68ac04020.
master
Andrew Dolgov 5 years ago
parent 6ec602e1a4
commit 925065b1fe

@ -712,10 +712,8 @@ class Handler_Public extends Handler {
user_error("Failed login attempt for $login from {$_SERVER['REMOTE_ADDR']}", E_USER_WARNING);
}
$return = clean($_REQUEST['return']);
if ($return && !is_absolute_url($return)) {
header("Location: " . $return);
if (clean($_REQUEST['return'])) {
header("Location: " . clean($_REQUEST['return']));
} else {
header("Location: " . get_self_url_prefix());
}

@ -2562,9 +2562,3 @@
return $ts;
}
function is_absolute_url($url) {
$parts = parse_url($url);
return $parts['host'] != '';
}

Loading…
Cancel
Save