Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

#64040 closed defect (bug) (invalid)

is_ssl() Breaks on Non-Standard HTTPS Port

Reported by: 404e's profile 404e Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.8.2
Component: General Keywords: close reporter-feedback
Focuses: Cc:

Description

The WordPress is_ssl() function incorrectly fails to detect an SSL connection when a site uses a non-standard HTTPS port (e.g., 3443 instead of 443). The issue lies with the specific line of code that checks ( '443' === (string) $_SERVERSERVER_PORT? ).

This flawed logic causes SSL-dependent functionality to break, including leading to redirect loops in the /wp-admin/ dashboard. After removing this specific port check from the function, my site's SSL detection works correctly and the redirect loop is resolved.

Change History (2)

#1 @westonruter
6 weeks ago

  • Keywords close reporter-feedback added

Hello!

I think this is why the function also checks for the $_SERVER['HTTPS'] is true or 'on'.

Just make sure that you set this variable and the function will work as desired. You can manually set it in your wp-config.php if need be. Does this work?

#2 @404e
6 weeks ago

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.