Commit Graph

280 Commits

Author SHA1 Message Date
Stanislav Malyshev
4d0565b5ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	ext/bz2/bz2.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 00:53:08 -07:00
Stanislav Malyshev
aca4f65c7e CS fix and comments with bug ID 2016-07-12 21:35:02 -07:00
Stanislav Malyshev
98b9dfaec9 Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
  and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
  local environment
2016-07-10 16:21:11 -07:00
Valentin V. Bartenev
baa812ca95 Removed a surplus condition in php_register_variable_ex()
The test for equality to " " implies that the character isn't NUL.
2016-07-05 16:06:19 +02:00
Dmitry Stogov
a9512af810 Implemented RFC: Fix inconsistent behavior of $this variable
Squashed commit of the following:

commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 00:19:42 2016 +0300

    Fixed GOTO VM

commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 21:01:57 2016 +0300

    Removed unused variable

commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 19:06:16 2016 +0300

    Protection from $this reassign through mb_parse_str()

commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:14:50 2016 +0300

    Added type inference rule for FETCH_THIS opcode

commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:11:18 2016 +0300

    Restored PHP-7 behavior of isset($this->foo).
    It throws exception if not in object context.
    Removed useless opcode handlers.

commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 12:25:47 2016 +0300

    Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".

commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:02:43 2016 +0300

    Throw exception on attempt to re-assign $this through extract() and parse_str().

commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 22:18:36 2016 +0300

    Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Anatol Belski
3a66a23679 avoid unnecessary scoping 2015-07-31 19:09:37 +02:00
Bob Weinand
13525328ed Cleanup shutdown, enable proper memory leak displaying
phpdbg should not memory leak...
2015-07-24 17:17:26 +02:00
Bob Weinand
348fc4d6fd $argv and $argc may be IS_INDIRECT 2015-07-22 00:22:39 +02:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Anatol Belski
c63467fe6e remove non-applicable comment 2015-05-24 23:49:43 +02:00
Anatol Belski
d5f695ce7b Merge branch 'PHP-5.6'
* PHP-5.6:
  increase the internal post data buffer
2015-05-23 18:47:26 +02:00
Anatol Belski
f3cec08e65 increase the internal post data buffer
This brings speedup and fixes issues with var parsing. Default BUFSIZ
on Windows is 512 bytes which causes too much reallocation work.
2015-05-23 18:44:39 +02:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
37634c9a67 fix datatype mismatch 2014-10-27 16:38:52 +01:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Michael Wallner
a6c47caf25 Merge branch 'PHP-5.6'
* PHP-5.6:
  duplicate value's string for the SAPI filter
  Fine tuned the order of adding request variables.
2014-09-09 06:56:33 +02:00
Michael Wallner
8d1099ac05 duplicate value's string for the SAPI filter
reported by sesser; tyrael, do you take care of the bug/NEWS?
2014-09-09 06:54:23 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
745a71be33 yet more fixes to zpp 2014-08-20 14:46:14 +02:00
Anatol Belski
90d6f60bc1 mostly fixes to spl, but also some other 2014-08-17 13:31:39 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Dmitry Stogov
7ce2d59ad2 Merge branch 'call-frame' into phpng
* call-frame:
  Simplify call-frame handling
  Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data)
  Use values from current_execute_data instead of globals where possible
  Removed EG(called_scope) and use corresponding value from EG(current_execute_data)
  Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something.
  Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data)
  Removed EG(active_op_array) and use corresponding value from EG(current_execute_data)
  Uinified call frame handling for user and internal functions. Now EG(current_execute_data) always point to the call frame of the currently executed function.
  Fixed cleanup of incompleytely passed parameters
  Prohibited parameter redefinition
  Fixed support for extra arguments in conjunction with variadiv argument. Use compile time flags to check if we call constructor and result of ZEND_NEW is used or not.
  Fixed uninitialized variables
  Optimization
  Changed zend_execute_data layout to reduce memory overhead
  Help C compilet to do the better job optimizing target code
  Use fast comparison for (func->type == ZEND_USER_FUNCTION || func->type == ZEND_EVAL_CODE)
  Keep extra args in the same VM stack segment (after all CV and TMP vars)
  Refactoring: merge call_frame and end_execute_data into single data structure. Keep only single copy of each argument on VM stack (previously ZE kept two copies of each arguments for user functions)
  Refactoring: use call_frames instead of call_slots

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-07-07 16:19:24 +04:00
Dmitry Stogov
6bf24f4dd0 Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data) 2014-07-04 18:03:45 +04:00
Xinchen Hui
21ccbbad7d Fixed segfault if empty POST 2014-07-03 23:58:21 +08:00
Xinchen Hui
2393000aeb Prefer the macro we defined 2014-05-07 17:06:27 +08:00
Xinchen Hui
ed5b6af8af Refactored filter 2014-05-07 16:52:58 +08:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Anatol Belski
60f976a45e Merge branch 'PHP-5.6'
* PHP-5.6:
  fix dll export
2014-04-24 10:53:31 +02:00
Anatol Belski
9280e25534 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dll export
2014-04-24 10:52:59 +02:00
Anatol Belski
acfed1c4c7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix dll export
2014-04-24 10:52:22 +02:00
Anatol Belski
03be983398 fix dll export 2014-04-24 10:51:42 +02:00
Bob Weinand
eae0f529f2 Merge branch 'PHP-5.6' 2014-04-12 23:55:35 +02:00
Bob Weinand
53b1dce587 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-12 23:54:57 +02:00
Bob Weinand
9302be3754 Merge branch 'PHP-5.4' into PHP-5.5 2014-04-12 23:54:29 +02:00
Bob Weinand
edd90e5ae3 Made usage of php_hash_environment useful by updating instead of just adding argc 2014-04-12 23:53:21 +02:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov
887189ca31 Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing 2014-03-26 18:07:31 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Xinchen Hui
f76a64fd3a Fixed variable name register 2014-03-05 14:20:47 +08:00
Xinchen Hui
43b03c74b3 Refacting smart_str 2014-02-18 17:42:46 +08:00
Dmitry Stogov
2b9b9afa7a Use better data structures (incomplete) 2014-02-17 17:59:18 +04:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui
0f53e37494 Merge branch 'PHP-5.6' 2014-01-03 11:09:07 +08:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Michael Wallner
4797f7ad16 Add E_DEPRECATED when populating $HTTP_RAW_POST_DATA 2013-12-30 14:28:43 +01:00
Anatol Belski
86dfe7be49 better way to fix PRIu64 availability on windows 2013-09-18 15:14:36 +02:00
Anatol Belski
4a85b5e190 fix build - PRIu64 vs %I64u 2013-09-17 16:02:08 +02:00
Michael Wallner
1c15d70cbd Merge branch 'slim-postdata'
* slim-postdata:
  slim post data
  add NEWS entry; add simple test
  more precise condition
  make this work in vc11 too
  Use int64_t and atoll() after discussion with johannes
  ws
  Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files above 2G.
2013-09-17 10:50:49 +02:00
Michael Wallner
2438490add slim post data 2013-08-27 13:31:35 +02:00
Christopher Jones
39612afc72 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.

Conflicts:
	ext/dba/libinifile/inifile.c
2013-08-14 20:43:25 -07:00
Christopher Jones
9ad97cd489 Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. 2013-08-14 20:36:50 -07:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Andrew Faulds
d12f8d6790 Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
- removed php_logo_guid()
- removed php_egg_logo_guid()
- removed php_real_logo_guid()
- removed zend_logo_guid()
- removed logo GUID handling
- removed logo GUIDs from source
- added logo data URIs instead for phpinfo()
- added credits to phpinfo() page, but hidden by default
2012-07-14 21:44:21 +01:00
Xinchen Hui
2e5e82a8ca MFH: Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars) 2012-03-02 03:18:04 +00:00
Dmitry Stogov
04f6171012 Improved max_input_vars directive to check nested variables 2012-02-14 08:58:52 +00:00
Dmitry Stogov
2ad7f44b7b Improved max_input_vars directive to check nested variables 2012-02-14 08:58:52 +00:00
Xinchen Hui
6672171672 Fixed bug #61000 (Exceeding max nesting level doesn't delete numerical vars). 2012-02-08 14:07:27 +00:00
Dmitry Stogov
29a909edcc Fixed memory leaks 2012-02-02 10:26:53 +00:00
Dmitry Stogov
cc1829d187 Fixed memory leaks 2012-02-02 10:26:53 +00:00
Stanislav Malyshev
4558f06648 fix UMR in php_register_variable_ex, reported by Stefan Esser 2012-02-01 19:52:05 +00:00
Stanislav Malyshev
9cb8f3ad48 fix UMR in php_register_variable_ex, reported by Stefan Esser 2012-02-01 19:52:05 +00:00
Patrick Allaert
b1721549dd Changed: restoring REQUEST_TIME as a long, introducing REQUEST_TIME_FLOAT instead as discussed on the ML 2012-01-06 13:38:06 +00:00
Patrick Allaert
a4305214a3 Changed: restoring REQUEST_TIME as a long, introducing REQUEST_TIME_FLOAT instead as discussed on the ML 2012-01-06 13:37:51 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
cef0d27af9 Change fatal error into warning and ignore arguments over limit 2011-12-22 15:31:41 +00:00
Dmitry Stogov
3305f5b133 Change fatal error into warning and ignore arguments over limit 2011-12-22 15:31:41 +00:00
Dmitry Stogov
6fb3897f80 Added max_input_vars directive to prevent attacks based on hash collisions 2011-12-14 08:56:35 +00:00
Dmitry Stogov
4ffedc700d Added max_input_vars directive to prevent attacks based on hash collisions 2011-12-14 08:56:35 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
e43ff1359e Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Pierre Joye
687e310a46 - ws 2011-08-23 18:32:53 +00:00
Pierre Joye
048485587e - ws 2011-08-23 18:32:53 +00:00
Pierre Joye
9805e1674a - remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ 2011-07-22 11:25:30 +00:00
Pierre Joye
cc1c7af037 - remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ 2011-07-22 11:25:30 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Jani Taskinen
2f27a0b1b8 - Cleanup 2010-11-17 11:55:37 +00:00
Ilia Alshanetsky
f89effd2a8 Updated _SERVER['REQUEST_TIME'] to include microsecond precision. 2010-11-06 17:14:21 +00:00
Dmitry Stogov
ab6ce922e2 Use stack instead of heap 2010-08-26 12:20:35 +00:00
Dmitry Stogov
f0c8366a9e - use interned strings for auto globals
- $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches)
2010-07-08 14:05:11 +00:00
Kalle Sommer Nielsen
febee11285 Removed register_globals 2010-04-21 01:27:22 +00:00
Kalle Sommer Nielsen
a5304b138f Removed register_long_arrays ini option (and $HTTP_SESSION_VARS from ext/session) 2010-04-15 16:36:08 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Antony Dovgal
322d57fffd WS 2008-08-30 22:26:09 +00:00
Rasmus Lerdorf
5f178004ea Oops, fix the assert. 2008-08-30 18:27:29 +00:00
Rasmus Lerdorf
f52d71d18e Fix for bugs 13961, 39927 and 45947 2008-08-30 16:47:46 +00:00