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

Cleaned up Port Validation and Removed Unnecessary Default Ports #50300

Merged
merged 2 commits into from
May 4, 2023
Merged

Cleaned up Port Validation and Removed Unnecessary Default Ports #50300

merged 2 commits into from
May 4, 2023

Conversation

ObliviousHarmony
Copy link
Contributor

@ObliviousHarmony ObliviousHarmony commented May 3, 2023

What?

This pull request changes the addition of ports to certain wp-config.php values to avoid adding default ports. I also made a small change to remove unnecessary parsing from checkPort.

Why?

#49883 introduced a bug when using HTTP and HTTPS default ports. It adds them to the hostname even though they are not used and will cause issues.

How?

When we are attempting to add or replace the default HTTP port (80) or the default HTTPS port (443), the port addition/replacement will not be performed.

Testing Instructions

  1. Create an override config and set the port for the web server to 80.
  2. Start/Update your environment.
  3. Visit it and ensure the links work and do not have the port on them.
Copy link
Member

@noahtallen noahtallen left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@noahtallen noahtallen merged commit 49b9e96 into WordPress:trunk May 4, 2023
@github-actions github-actions bot added this to the Gutenberg 15.8 milestone May 4, 2023
@bph bph added [Type] Bug An existing feature does not function as intended [Package] Env /packages/env labels May 8, 2023
@Luehrsen
Copy link
Contributor

Luehrsen commented May 9, 2023

Thank you for including my fix so fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Env /packages/env [Type] Bug An existing feature does not function as intended
4 participants