Skip to content

Conversation

jkbcz
Copy link
Contributor

@jkbcz jkbcz commented Nov 7, 2023

Makes following changes to improve robustness of the login redirect

  1. Use redirects without schema - on some PHP environments (kinsta) $_SERVER['REQUEST_SCHEMA'] is not available, so to make sure redirects work in those environments we omit schema from redirect links
  2. Going directly to /wp-login.php redirects to home page after login, not wp-admin - This behavior used to depend on whether permalink structure was set to plain or pretty; this difference doesn't make sense and we should consolidate on always redirecting to home page, if someone wants to directly access the admin panel they should go to /wp-admin
  3. Only use host for validating redirects, this had to be done, so the redirects without schema work.

@jkbcz jkbcz requested a review from rvanoord November 7, 2023 08:50
Copy link
Member

@rvanoord rvanoord left a comment

Choose a reason for hiding this comment

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

I'm not sure "schemaless" urls are supported by all older browsers. Suggest defaulting to https:// if the scheme can't be identified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants