[wp-trac] [WordPress Trac] #28658: is_ssl() may fail on ssl, relying on mod_ssl.

WordPress Trac noreply at wordpress.org
Fri Jun 27 08:25:47 UTC 2014


#28658: is_ssl() may fail on ssl, relying on mod_ssl.
--------------------------+-----------------------------
 Reporter:  mampf         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Dear developers,

 in functions.php, you rely on reading
 {{{
 $_SERVER['HTTPS']
 '443' == $_SERVER['SERVER_PORT']
 }}}
 to detect wether SSL is enabled or not. This is not sufficient.

 The hoster [https://wiki.uberspace.de/webserver:htaccess#ssl_erzwingen
 uberspace] (and probably many more) use [http://www.apsis.ch/pound pound]
 as https frontend. Pound and others will not set 'HTTPS', but 'ENV:HTTPS'.

 Thus, if on a pound server with a non-standard-port, this function will
 return "false" when the opposite is true.

 Please check for ENV:HTTPS as well (and probably others).

 Thanks.

 [https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
 includes/functions.php#L3367 Code link]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28658>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list