thetaphi                                 Thu, 11 Aug 2011 20:25:24 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=314799

Log:
Bug #55403: Don't set $_SERVER['HTTPS'] on unsecure connection

Bug: https://bugs.php.net/55403 (Assigned) $_SERVER['HTTPS'] should be 
undefined on unsecure connection
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/sapi/nsapi/nsapi.c
    U   php/php-src/trunk/sapi/nsapi/nsapi.c

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS   2011-08-11 20:18:05 UTC (rev 314798)
+++ php/php-src/branches/PHP_5_4/NEWS   2011-08-11 20:25:24 UTC (rev 314799)
@@ -12,6 +12,9 @@
   . Added Shift_JIS Emoji (pictograms) support. (rui)
   . Ill-formed UTF-8 check for security enhancements. (rui)

+- Improved NSAPI SAPI: (Uwe Schindler)
+  . Don't set $_SERVER['HTTPS'] on unsecure connection (bug #55403).
+
 04 Aug 2011, PHP 5.4.0 Alpha 3
 - Added features:
  . Short array syntax, see UPGRADING guide for full details (rsky0711 at gmail

Modified: php/php-src/branches/PHP_5_4/sapi/nsapi/nsapi.c
===================================================================
--- php/php-src/branches/PHP_5_4/sapi/nsapi/nsapi.c     2011-08-11 20:18:05 UTC 
(rev 314798)
+++ php/php-src/branches/PHP_5_4/sapi/nsapi/nsapi.c     2011-08-11 20:25:24 UTC 
(rev 314799)
@@ -723,7 +723,9 @@
        nsapi_free(value);

        php_register_variable("SERVER_SOFTWARE", system_version(), 
track_vars_array TSRMLS_CC);
-       php_register_variable("HTTPS", (security_active ? "ON" : "OFF"), 
track_vars_array TSRMLS_CC);
+       if (security_active) {
+               php_register_variable("HTTPS", "ON", track_vars_array 
TSRMLS_CC);
+       }
        php_register_variable("GATEWAY_INTERFACE", "CGI/1.1", track_vars_array 
TSRMLS_CC);

        /* DOCUMENT_ROOT */

Modified: php/php-src/trunk/sapi/nsapi/nsapi.c
===================================================================
--- php/php-src/trunk/sapi/nsapi/nsapi.c        2011-08-11 20:18:05 UTC (rev 
314798)
+++ php/php-src/trunk/sapi/nsapi/nsapi.c        2011-08-11 20:25:24 UTC (rev 
314799)
@@ -723,7 +723,9 @@
        nsapi_free(value);

        php_register_variable("SERVER_SOFTWARE", system_version(), 
track_vars_array TSRMLS_CC);
-       php_register_variable("HTTPS", (security_active ? "ON" : "OFF"), 
track_vars_array TSRMLS_CC);
+       if (security_active) {
+               php_register_variable("HTTPS", "ON", track_vars_array 
TSRMLS_CC);
+       }
        php_register_variable("GATEWAY_INTERFACE", "CGI/1.1", track_vars_array 
TSRMLS_CC);

        /* DOCUMENT_ROOT */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to