Commit Graph

217 Commits

Author SHA1 Message Date
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Stanislav Malyshev
9b1a224d4e Merge branch 'PHP-5.6'
* PHP-5.6: (21 commits)
  fix unit tests
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  ...

Conflicts:
	ext/exif/exif.c
	ext/gmp/gmp.c
	ext/pcre/php_pcre.c
	ext/session/session.c
	ext/session/tests/session_decode_variation3.phpt
	ext/soap/soap.c
	ext/spl/spl_observer.c
	ext/standard/var.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/xsl/xsltprocessor.c
2015-09-02 00:37:20 -07:00
Stanislav Malyshev
3fe509443c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix unit tests
2015-09-01 12:24:14 -07:00
Stanislav Malyshev
4aeff30337 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix unit tests
2015-09-01 12:23:55 -07:00
Stanislav Malyshev
1922c650ba fix unit tests 2015-09-01 12:23:22 -07:00
Stanislav Malyshev
c19d59c550 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/zip/php_zip.c
2015-09-01 12:06:41 -07:00
Stanislav Malyshev
33d3acaae7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	configure.in
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_version.h
2015-09-01 11:42:19 -07:00
Stanislav Malyshev
1390a5812b Fix bug #70312 - HAVAL gives wrong hashes in specific cases 2015-09-01 01:16:30 -07:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Xinchen Hui
c196e86520 Fixed skipf 2015-06-14 13:44:39 +08:00
Xinchen Hui
dc37d3e8c2 Fixed Bug #69823 (PHP 7.0.0alpha1 segmentation fault when exactly 33 extensions are loaded) 2015-06-14 12:28:40 +08:00
Stanislav Malyshev
b3709bfc52 Merge branch 'PHP-5.6'
* PHP-5.6: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  ...

Conflicts:
	Zend/zend_exceptions.c
	ext/curl/interface.c
	ext/dom/document.c
	ext/fileinfo/libmagic/softmagic.c
	ext/gd/gd.c
	ext/hash/hash.c
	ext/pgsql/pgsql.c
	ext/phar/phar.c
	ext/phar/phar_internal.h
	ext/standard/http_fopen_wrapper.c
	ext/standard/link.c
	ext/standard/streamsfuncs.c
	ext/xmlwriter/php_xmlwriter.c
	ext/zlib/zlib.c
2015-04-14 01:28:06 -07:00
Stanislav Malyshev
5776fceb16 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  ...

Conflicts:
	ext/standard/http_fopen_wrapper.c
2015-04-14 01:05:01 -07:00
Stanislav Malyshev
0cb9d75cb6 Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40:
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  Fixed bug #68901 (use after free)
  Fixed bug #68740 (NULL Pointer Dereference)
  Fix bug #66550 (SQLite prepared statement use-after-free)
  Better fix for #68601 for perf 81e9a993f2
  Fix bug #68601 buffer read overflow in gd_gif_in.c
  Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4"
  Fixed bug #69293
  Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
2015-04-11 16:56:12 -07:00
Stanislav Malyshev
4435b9142f Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) 2015-04-11 16:53:22 -07:00
Dmitry Stogov
b8ba3203e5 Cleanup 2015-04-07 14:19:12 +03:00
Anatol Belski
2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Anatol Belski
0313394fe4 revert yet unready stuff 2015-03-23 15:09:10 +01:00
Anatol Belski
567565b24f more fixes to the shared compilation 2015-03-23 15:09:09 +01:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Xinchen Hui
942809909e Cleanup resource handling APIs 2015-02-02 13:23:16 +08:00
Rasmus Lerdorf
c5e56f7868 int -> size_t 2015-01-20 22:53:11 -08:00
Rasmus Lerdorf
bcaa06de3a int -> size_t 2015-01-20 22:51:09 -08: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
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
55d5bace0e more usages for ZEND_SECURE_ZERO() 2014-09-19 01:59:55 +02:00
Anatol Belski
c45f4f5461 generalized the case with secure memory zeroing 2014-09-19 01:46:14 +02:00
Anatol Belski
a4532f6d4d fix hash_pbkdf2() 2014-08-28 08:55:05 +02:00
Anatol Belski
6db8d4f829 's' works with size_t round 3 2014-08-27 20:49:36 +02:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +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
7815d23e9e fix zpp and a bit more 2014-08-21 20:22:18 +02:00
Anatol Belski
729bce4321 fix hash 2014-08-19 22:57:07 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Lior Kaplan
1953438ca0 RETVAL_STRING takes only one variable
Follow up for commit f4cfaf36
2014-07-22 19:38:35 +03:00
Lior Kaplan
da81873a46 RETURN_STRINGL takes only two variables
Follow up for commit f4cfaf36
2014-07-22 19:38:35 +03:00
Pierre Joye
5fa4e047b0 unused var 2014-05-15 11:36:40 +02: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
Nikita Popov
58089c5977 Port ext/hash
Unsure what to do about hash_final
2014-04-23 20:34:05 +02:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Rouven Weßling
2148a88b3d Add hash_equals() to perform string comparisons that are not vulnerable to timing attacks. 2014-03-17 09:37:28 +01:00
Nikita Popov
e617dfbdf3 Merge branch 'PHP-5.5' into PHP-5.6 2014-03-12 14:16:58 +01:00
Nikita Popov
06bbb657ad Fix hash_pbkdf2() with missing $length argument
Also change the type of some string length variables to ensure
that the zpp call works correctly on platforms where sizeof(int)
!= sizeof(long).
2014-03-12 14:16:18 +01:00
Michael M Slusarz
b88387d341 Fix #66698: Add fnv1a32 and fnv1a64 hash options 2014-03-06 23:38:51 +01: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
Manuel Mausz
7dbb1bba64 fix failing tests 2013-09-05 09:32:12 +02:00
Manuel Mausz
0be6ecb862 fix indention 2013-09-05 01:19:00 +02:00
Manuel Mausz
8ca43527e8 Add support for CryptoPro S-box for GOST
This adds a new hash identifier "gost-crypto" which uses the CryptoPro
S-box tables as specified by RFC 4357, section 11.2.
2013-09-05 01:04:25 +02:00
Michael Wallner
611122c22e Merge branch '2Guploads'
* 2Guploads:
  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.
  unify stdint type usage
2013-08-09 11:47:25 +02:00
Michael Wallner
14caf174ff unify stdint type usage
if you need C99 stdint types, just include "php_stdint.h"
2013-08-06 22:49:56 +02:00
Christopher Jones
4c3c9d1fe5 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix long-standing visual pain point: the misalignment of './configure help' text. Whitespace changes and a couple of grammar fixes.
2013-08-06 11:09:12 -07:00
Christopher Jones
c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -07:00
Stanislav Malyshev
02457554a3 Merge branch 'PHP-5.5'
* PHP-5.5:
  backward compatibility
  HASH_KEY_NON_EXISTANT fix
2013-07-21 20:10:31 -07:00
Veres Lajos
4749457a49 HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
Veres Lajos
e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos
1b06e0be96 typo fixes 2013-07-15 00:19:49 -07:00
Veres Lajos
72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Stanislav Malyshev
8ac131503d Merge branch 'PHP-5.5'
* PHP-5.5:
  Merge branch 'pull-request/341'
  Merge branch 'pull-request/341'
2013-06-10 14:31:57 -07:00
Stanislav Malyshev
02e4d7a290 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Anthony Ferrara
2129c70896 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix #64745 hash_pbkdf2 truncation issue
2013-05-28 15:38:11 -04:00
Anthony Ferrara
540a5a52e8 Fix #64745 hash_pbkdf2 truncation issue
When using hash_pbkdf2 with hex output and 0 length (auto), it incorrectly
truncates the result to 1/2 the expected result.
2013-05-28 15:30:45 -04:00
Sara Golemon
6aefaad46e Fix race condition when ext/hash/tests run in parallel 2013-04-30 16:28:37 -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
Anthony Ferrara
03536e889a More cleanup of documentation and comments, as well as code formatting 2012-06-12 15:05:44 -04:00
Anthony Ferrara
2f1cd2cb13 Fix tests to use proper casing 2012-06-12 14:52:43 -04:00
Anthony Ferrara
43eb8dc04a Remove un-needed memset, and replacing stray spaces 2012-06-12 14:32:21 -04:00
Anthony Ferrara
df3d351cad Update error messages to be more inline with PHP standards 2012-06-12 14:10:35 -04:00
Anthony Ferrara
4918acccc6 refactor away un-necessary casts in hashing routines 2012-06-12 14:09:16 -04:00
Anthony Ferrara
6387498823 Create hash_pbkdf2 function addition 2012-06-12 09:57:11 -04:00
Michael Wallner
260e77709d fix tests failing due to corrected hash tiger
mhash_00{1,3}.phpt were failing because of the corrected hash tiger byte
output order

fixes bug #60922:
 tests fail for mhash() and mhash_keygen_s2k() functions and MHASH_TIGER
2012-03-19 21:49:47 +01:00
Michael Wallner
6a7bbb1561 merge ext/hash from trunk 2012-01-18 09:15:34 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Xinchen Hui
42fd7352fb Add skipif 2011-09-06 09:29:04 +00:00
Felipe Pena
4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Pierre Joye
45420bb669 - 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, missing tests changes in 5.4 2011-07-22 11:56:20 +00:00
Felipe Pena
32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Pierre Joye
a7ffa09e18 - add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd 2010-12-11 22:18:10 +00:00
Ilia Alshanetsky
50e6d20d3c Fixed bug #51003 (unaligned memory access in ext/hash/hash_tiger.c). 2010-11-22 13:12:28 +00:00
Adam Harvey
18096f4b68 Implemented FR #53213 (Adler32 algorithm is very slow). Patch by zavasek at
yandex dot ru.
2010-11-08 09:35:33 +00:00
Kalle Sommer Nielsen
466c0b88d7 Fixed signedness compiler warning 2010-09-23 03:33:36 +00:00
Kalle Sommer Nielsen
aeb1dc7cc4 Fixed bug #51943 (Several files are out of ANSI spec)
# Based on patch by CoreyStup at gmail dot com
2010-07-13 23:59:54 +00:00
Felipe Pena
e66279a55e - Fixed bug #52240 (hash_copy() does not copy the HMAC key, causes wrong results and PHP crashes) 2010-07-03 13:06:14 +00:00
Kalle Sommer Nielsen
dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Stanislav Malyshev
129019b9fc fix 64-bit integer overflow in mhash_keygen_s2k 2010-04-20 00:45:07 +00:00
Martin Jansen
71ec12cc78 JOAAT hashing now supports incremental hashing. 2010-03-28 10:01:02 +00:00
Martin Jansen
2bc269d375 Fixed test for the recently added algorithmus and made it more
debuggable by adding the names of the algorithmus to the output.
2010-03-25 16:05:27 +00:00
Rob Richards
7bfd44f79c fix build - there are now 34 algos 2010-03-25 15:10:49 +00:00
Pierre Joye
3054f00621 - init hval 2010-03-25 10:00:31 +00:00