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

Remove added query parameters after login redirect #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JakubC-projects
Copy link
Contributor

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.

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