MFH? --Jani On Sun, 23 Mar 2003, Shane Caraveo wrote:
>shane Sun Mar 23 15:16:41 2003 EDT > > Modified files: > /php4/sapi/cgi cgi_main.c > Log: > For fastcgi env vars, don't magic quote them > >Index: php4/sapi/cgi/cgi_main.c >diff -u php4/sapi/cgi/cgi_main.c:1.216 php4/sapi/cgi/cgi_main.c:1.217 >--- php4/sapi/cgi/cgi_main.c:1.216 Tue Mar 18 07:06:09 2003 >+++ php4/sapi/cgi/cgi_main.c Sun Mar 23 15:16:41 2003 >@@ -20,7 +20,7 @@ > +----------------------------------------------------------------------+ > */ > >-/* $Id: cgi_main.c,v 1.216 2003/03/18 12:06:09 ssb Exp $ */ >+/* $Id: cgi_main.c,v 1.217 2003/03/23 20:16:41 shane Exp $ */ > > #include "php.h" > #include "php_globals.h" >@@ -431,6 +431,9 @@ > if (!FCGX_IsCGI()) { > FCGX_Request *request = (FCGX_Request *)SG(server_context); > char **env, *p, *t; >+ /* turn off magic_quotes while importing environment variables */ >+ int magic_quotes_gpc = PG(magic_quotes_gpc); >+ PG(magic_quotes_gpc) = 0; > > for (env = request->envp; env != NULL && *env != NULL; env++) { > p = strchr(*env, '='); >@@ -441,6 +444,7 @@ > php_register_variable(t, p+1, array_ptr TSRMLS_CC); > efree(t); > } >+ PG(magic_quotes_gpc) = magic_quotes_gpc; > } > /* call php's original import as a catch-all */ > php_php_import_environment_variables(array_ptr TSRMLS_CC); > > > > -- <- For Sale! -> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php