Opened 6 weeks ago
Closed 6 weeks ago
#64040 closed defect (bug) (invalid)
is_ssl() Breaks on Non-Standard HTTPS Port
| Reported by: |
|
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)
Note: See
TracTickets for help on using
tickets.
Hello!
I think this is why the function also checks for the
$_SERVER['HTTPS']istrueor'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.phpif need be. Does this work?