Re: [PHP4BETA] Bug:Upload tmpname with register globals off.

From: Date: Sun, 02 Apr 2000 22:17:09 +0000
Subject: Re: [PHP4BETA] Bug:Upload tmpname with register globals off.
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13020@lists.php.net to get a copy of this message
Better late than never - I submitted a patch that adds [tmp_name] as well. Thanks. Zeev At 22:31 28/03/2000 , Shane Burrell wrote:
We have used this patch for about 2 weeks with no problems. If you have register_globals off there is no way to get the tmpname of the userfile. I have attached the patch with adds tmpname to the HTTP_*_VARS array for uploads. Other people haved used it also with no problems. Index: rfc1867.c =================================================================== RCS file: /repository/php4/rfc1867.c,v retrieving revision 1.30 diff -r1.30 rfc1867.c 129c129,131
<                                       lbuf = emalloc(s-name + MAX(MAX(sizeof("[name]"),sizeof("[size]")),sizeof("[type]")));
---
                                      lbuf = emalloc(s-name + MAX(MAX(MAX(sizeof("[name]"),sizeof("[size]")),sizeof("[type]")),sizeof("[ tmpname]")));
269a272,276
                              /* Add $foo[tmpname] */
                              sprintf(lbuf, "%s[tmpname]", namebuf);
        register_http_post_files_variable(lbuf, fn, http_post_files ELS_CC PLS_CC);
-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/

« previous php.version4 (#13020) next »