Commit Graph

752 Commits

Author SHA1 Message Date
Anatol Belski
f4c07e7e76 cleanup duplicated stat declarations in ext/phar 2015-05-25 18:03:22 +02:00
Anatol Belski
8d7003f708 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix test
  Add entry for bug #69354, fixed in 5.5.25
  Add CVE for bugs in 5.6.9
  Add entry about PCRE upgrade (rev 95fa7279)
  Add CVE for bugs in 5.5.25

Conflicts:
	ext/phar/tests/bug69441.phpt
2015-05-22 21:32:40 +02:00
Anatol Belski
0bc3a74334 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test
2015-05-22 21:27:19 +02:00
Anatol Belski
d9c266f4c9 fix test
Sometimes the path is unixified, sometimes not, so better don't
care about the slash in this case.
2015-05-22 21:25:52 +02:00
Remi Collet
aec039cc6e Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  Fixed bug #69680 (phar symlink in binary directory broken).
  Make the phar symlink relative
2015-05-21 14:07:14 +02:00
Remi Collet
17d5ebe76e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69680 (phar symlink in binary directory broken).
  Make the phar symlink relative
2015-05-21 14:06:26 +02:00
ponce
c3d983f3af Make the phar symlink relative
or we got a symlink pointing to the build files
thanks also to remicollet
2015-05-21 14:03:18 +02:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Nikita Popov
c9f27ee422 Display EngineExceptions like ordinary exceptions
TypeException stays as-is for now because it uses messages that are
incompatible with the way exception messages are displayed.

closure_038.phpt and a few others now show that we're generating
too many exceptions for compound operations on undefined properties
-- this needs to be fixed in a followup.
2015-05-15 23:40:32 +02:00
Stanislav Malyshev
5a1bef8eef Merge branch 'PHP-5.6'
* PHP-5.6:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	Zend/zend_alloc.c
	Zend/zend_operators.c
	ext/ftp/ftp.c
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/dir.c
	ext/standard/file.c
	ext/standard/pack.c
	ext/standard/string.c
	main/rfc1867.c
2015-05-12 15:00:24 -07:00
Stanislav Malyshev
587ddf6ddc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/standard/pack.c
2015-05-12 14:26:06 -07:00
Stanislav Malyshev
c08f9c2c78 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/pack.c
	ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Stanislav Malyshev
e2bbf0a2df Forgot test file 2015-05-10 02:24:29 -07:00
Dmitry Stogov
3abde43231 Added experimental (disabled by default) file based opcode cache. 2015-05-06 23:46:49 +03:00
Stanislav Malyshev
c27f012b7a Fix bug #69453 - don't try to cut empty string 2015-04-29 22:51:43 -07:00
Anatol Belski
4a38f51857 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  fix more dir separators
2015-04-19 20:34:36 +02:00
Anatol Belski
0ec5477fbd Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  fix more dir separators
2015-04-19 20:32:37 +02:00
Anatol Belski
a0accfa59f fix more dir separators 2015-04-19 20:27:28 +02:00
Anatol Belski
b816266223 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix dir separator in test
2015-04-15 11:10:29 +02:00
Anatol Belski
e53947609a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dir separator in test
2015-04-15 11:09:54 +02:00
Anatol Belski
8947c7aa0d fix dir separator in test 2015-04-15 11:07:13 +02:00
Xinchen Hui
556e6f6cb1 Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_exceptions.c
2015-04-15 10:44:51 +08:00
Xinchen Hui
caf4beab2d Merge branch 'PHP-5.5' into PHP-5.6 2015-04-15 10:39:17 +08:00
Xinchen Hui
be504995c3 Fixed warnings 2015-04-15 10:37:35 +08:00
Dmitry Stogov
cee9722028 Fixed recently introduced memory leak 2015-04-14 11:08:38 -07:00
Dmitry Stogov
6762fcfa90 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed recently introduced memory leak
2015-04-14 15:49:44 +03:00
Dmitry Stogov
e1821090ef Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed recently introduced memory leak
2015-04-14 15:48:20 +03:00
Dmitry Stogov
dfffa0ba5b Fixed recently introduced memory leak 2015-04-14 15:47:26 +03: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
e21f87e957 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix type in fix for #69085
  fix CVE num

Conflicts:
	configure.in
	main/php_version.h
2015-04-14 00:34:02 -07:00
Stanislav Malyshev
f59b67ae50 Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode) 2015-04-14 00:03:50 -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
12d3bdee3d Additional fix for bug #69324
Not so happy about duplication but needed due to bug #69429
2015-04-11 16:53:22 -07:00
Stanislav Malyshev
9faaee66fa Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar) 2015-04-11 16:53:21 -07:00
Xinchen Hui
920a0afbf8 Fixed bug #68901 (use after free) 2015-04-11 16:28:07 -07:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Dmitry Stogov
4796e0242b Merge branch 'InternalClassClean'
* InternalClassClean:
  Fixed test
  Patch improvement:
  Fixed indentation. Fixed comment style. Fixed commented out code.
  Reverted change to function name and added note of why it is different from the class it is actually changing.
  Made UConverter throw an exception if the constructor fails.
  Fixed PDO constructor to not return null.
  Fixed fileinfo behaviour.
  Made Phar throw exception on bad constructor.
  Converted intl extension to use IntlException in constructors.
  Fixed SplFixedArray and tests.
  Fixed ReflectionExtension and ReflectionProperty.
  Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
  Fixed PDORow behaviour and message.
2015-04-01 12:11:13 +03:00
Dmitry Stogov
1018f462d8 Patch improvement:
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Michael Wallner
3ec9d9f3b6 Merge branch 'PHP-5.6'
* PHP-5.6:
  BFN
  Fixed bug #64931
2015-03-30 16:29:18 +02:00
Michael Wallner
a4490bb0a2 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #64931
2015-03-30 16:25:47 +02:00
Michael Wallner
6480725007 Fixed bug #64931
phar_add_file is too restrive on filename

Check for any of '/', '\\', '\0' after ".phar".
2015-03-30 16:24:19 +02:00
Michael Wallner
8994a5eb1d Merge branch 'PHP-5.6'
* PHP-5.6:
  BFN
  Fixed Bug #65467
2015-03-30 15:41:53 +02:00
Michael Wallner
3c22449649 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed Bug #65467
2015-03-30 15:41:03 +02:00
Michael Wallner
6de25c155e Fixed Bug #65467
Call to undefined method cli_arg_typ_string

Use cli_arg_typ_filecontent instead.
2015-03-30 15:39:30 +02:00
Michael Wallner
e148fff61d Merge branch 'PHP-5.6'
* PHP-5.6:
  BFN
  fix bug #67761
2015-03-30 14:45:38 +02:00
Michael Wallner
90a8b59e9c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix bug #67761
2015-03-30 14:42:37 +02:00
Michael Wallner
8f7e378b9f fix bug #67761
Phar::mapPhar fails for Phars inside a path containing ".tar".

Strengthen the silly .tar file extension check.
2015-03-30 14:41:30 +02:00
Xinchen Hui
74090539c1 It's lowercase now 2015-03-30 20:32:02 +08:00
Xinchen Hui
ab4f120c6a Merge branch 'PHP-5.6'
Conflicts:
	NEWS
	ext/opcache/Optimizer/pass1_5.c
2015-03-30 20:20:55 +08:00