Fixes #6020 -- Fix relative base URL redirects.

This commit is contained in:
Buster Neece 2023-01-16 01:49:28 -06:00
parent 303a4a73ad
commit 7be64fbe06
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 2 additions and 11 deletions

View File

@ -31,9 +31,9 @@ final class IndexAction
if (!($user instanceof Entity\User)) {
// Redirect to a custom homepage URL if specified in settings.
$homepageRedirect = $settings->getHomepageRedirectUrlAsUri();
$homepageRedirect = $settings->getHomepageRedirectUrl();
if (null !== $homepageRedirect) {
return $response->withRedirect((string)$homepageRedirect, 302);
return $response->withRedirect($homepageRedirect, 302);
}
return $response->withRedirect($request->getRouter()->named('account:login'));

View File

@ -372,15 +372,6 @@ class Settings implements Stringable
return $this->homepage_redirect_url;
}
public function getHomepageRedirectUrlAsUri(): ?UriInterface
{
return Urls::tryParseUserUrl(
$this->homepage_redirect_url,
'Homepage Redirect URL',
false
);
}
public function setHomepageRedirectUrl(?string $homepageRedirectUrl): void
{
$this->homepage_redirect_url = $this->truncateNullableString($homepageRedirectUrl);