shane           Sat Mar 29 20:06:54 2003 EDT

  Modified files:              
    /php4/main  php_variables.c 
  Log:
  _SERVER also should not be quoted by magic_quotes_GPC
  also remove an empty if statement
  
  
Index: php4/main/php_variables.c
diff -u php4/main/php_variables.c:1.59 php4/main/php_variables.c:1.60
--- php4/main/php_variables.c:1.59      Fri Mar 28 12:09:04 2003
+++ php4/main/php_variables.c   Sat Mar 29 20:06:54 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_variables.c,v 1.59 2003/03/28 17:09:04 moriyoshi Exp $ */
+/* $Id: php_variables.c,v 1.60 2003/03/30 01:06:54 shane Exp $ */
 
 #include <stdio.h>
 #include "php.h"
@@ -481,11 +481,14 @@
 static inline void php_register_server_variables(TSRMLS_D)
 {
        zval *array_ptr=NULL;
+       /* turn off magic_quotes while importing server variables */
+       int magic_quotes_gpc = PG(magic_quotes_gpc);
 
        ALLOC_ZVAL(array_ptr);
        array_init(array_ptr);
        INIT_PZVAL(array_ptr);
        PG(http_globals)[TRACK_VARS_SERVER] = array_ptr;
+       PG(magic_quotes_gpc) = 0;
 
        /* Server variables */
        if (sapi_module.register_server_variables) {
@@ -504,6 +507,7 @@
        if (SG(request_info).auth_password) {
                php_register_variable("PHP_AUTH_PW", SG(request_info).auth_password, 
array_ptr TSRMLS_CC);
        }
+       PG(magic_quotes_gpc) = magic_quotes_gpc;
 }
 /* }}} */
 
@@ -599,13 +603,8 @@
                }
        }
 
-       if (!jit_initialization) {
-               if (!have_variables_order) {
-                       php_register_server_variables(TSRMLS_C);
-               }
-               if (!PG(http_globals)[TRACK_VARS_ENV]) {
-
-               }
+       if (!jit_initialization && !have_variables_order) {
+               php_register_server_variables(TSRMLS_C);
        }
 
        for (i=0; i<num_track_vars; i++) {



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

Reply via email to