diff --git a/classes/handler/public.php b/classes/handler/public.php index 16f8020bb..c3f18d8bb 100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -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()); } diff --git a/include/functions.php b/include/functions.php index 7f00f2f04..8c0654f3c 100755 --- a/include/functions.php +++ b/include/functions.php @@ -2562,9 +2562,3 @@ return $ts; } - - function is_absolute_url($url) { - $parts = parse_url($url); - - return $parts['host'] != ''; - }