cvs: php-src(PHP_5_2) / NEWS /main rfc1867.c
| From: | Arnaud Le Blanc | Date: | Sun, 07 Sep 2008 14:18:12 +0000 |
| Subject: | cvs: php-src(PHP_5_2) / NEWS /main rfc1867.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52959@lists.php.net to get a copy of this message | ||
lbarnaud Sun Sep 7 14:18:12 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/main rfc1867.c
Log:
MFH: More accurate max_file_size / upload_max_filesize (fixes #45124)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1214&r2=1.2027.2.547.2.1215&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1214 php-src/NEWS:1.2027.2.547.2.1215
--- php-src/NEWS:1.2027.2.547.2.1214 Sat Sep 6 17:19:15 2008
+++ php-src/NEWS Sun Sep 7 14:18:11 2008
@@ -69,6 +69,8 @@
(Dmitry)
- Fixed bug #45139 (ReflectionProperty returns incorrect declaring class).
(Felipe)
+- Fixed bug #45124 ($_FILES['upload']['size'] sometimes return zero and
+ sometimes the filesize). (Arnaud)
- Fixed bug #45028 (CRC32 output endianness is different between crc32()
and hash()). (Tony)
- Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format).
http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.173.2.1.2.12&r2=1.173.2.1.2.13&diff_format=u
Index: php-src/main/rfc1867.c
diff -u php-src/main/rfc1867.c:1.173.2.1.2.12 php-src/main/rfc1867.c:1.173.2.1.2.13
--- php-src/main/rfc1867.c:1.173.2.1.2.12 Sat Sep 6 17:19:15 2008
+++ php-src/main/rfc1867.c Sun Sep 7 14:18:11 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: rfc1867.c,v 1.173.2.1.2.12 2008/09/06 17:19:15 lbarnaud Exp $ */
+/* $Id: rfc1867.c,v 1.173.2.1.2.13 2008/09/07 14:18:11 lbarnaud Exp $ */
/*
* This product includes software developed by the Apache Group
@@ -1077,12 +1077,12 @@
}
- if (PG(upload_max_filesize) > 0 && total_bytes > PG(upload_max_filesize)) {
+ if (PG(upload_max_filesize) > 0 && (total_bytes+blen) > PG(upload_max_filesize))
{
#if DEBUG_FILE_UPLOAD
sapi_module.sapi_error(E_NOTICE, "upload_max_filesize of %ld bytes exceeded - file
[%s=%s] not saved", PG(upload_max_filesize), param, filename);
#endif
cancel_upload = UPLOAD_ERROR_A;
- } else if (max_file_size && (total_bytes > max_file_size)) {
+ } else if (max_file_size && ((total_bytes+blen) > max_file_size)) {
#if DEBUG_FILE_UPLOAD
sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not
saved", max_file_size, param, filename);
#endif