Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redirect during initial setup #28995

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Sep 29, 2021

$this->request->getServerHost() return an empty string during the initial setup as it validate the request's domain against the trusted domains list.

Combined with the recently added cache of URLGenerator->baseUrl, this leads to a wrong redirect during the initial setup process.

This PR adds a check to ensure that the cached baseUrl is not used if it only contains the protocol.

Fix: #27575

Signed-off-by: Louis Chemineau <louis@chmn.me>
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and works. Thanks for fixing this :)

@szaimen
Copy link
Contributor

szaimen commented Sep 29, 2021

/backport to stable22

@szaimen
Copy link
Contributor

szaimen commented Sep 29, 2021

/backport to stable21

@szaimen
Copy link
Contributor

szaimen commented Sep 29, 2021

/backport to stable20

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 29, 2021
@artonge
Copy link
Contributor Author

artonge commented Sep 29, 2021

Well, that was fast, thanks for the quick review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: install and update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fresh installation redirects to http://index.php/apps/dashboard/ (host missing)
3 participants