mirror of https://tt-rss.org/git/tt-rss.git
add trailing slash to post-login redirect because not having it seems to make browsers strip custom ports
This commit is contained in:
parent
0f9488ace0
commit
98483922bb
|
@ -416,10 +416,11 @@ class Handler_Public extends Handler {
|
|||
$_SESSION["login_error_msg"] ??= __("Incorrect username or password");
|
||||
}
|
||||
|
||||
$return = clean($_REQUEST['return']);
|
||||
$return = preg_replace("#/*$#", "", clean(urldecode($_REQUEST['return'] ?? "")));
|
||||
|
||||
if ($_REQUEST['return'] && mb_strpos($return, Config::get_self_url()) === 0) {
|
||||
header("Location: " . clean($_REQUEST['return']));
|
||||
if ($return && mb_strpos($return, Config::get_self_url()) === 0) {
|
||||
# redirecting to something like http://hostname:8888/tt-rss without trailing slash seems to be working incorrectly
|
||||
header("Location: $return/");
|
||||
} else {
|
||||
header("Location: " . Config::get_self_url());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue