Commit Graph

722 Commits

Author SHA1 Message Date
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
c3cf01b553
Fix #78880: Yet another batch of spelling errors 2020-01-16 12:04:00 +01:00
Máté Kocsis
bbcfa66e06
Use RETURN_THROWS() after zend_fetch_resource*() 2020-01-03 19:20:56 +01:00
Máté Kocsis
382a038e05
Use ZEND_THROWS() during ZPP in enchant, exif, fileinfo, filter, and FTP extensions 2019-12-31 00:21:37 +01:00
Nikita Popov
5f2f450554 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #74170: locale information change after mime_content_type
2019-12-20 11:24:14 +01:00
Nikita Popov
d4ba1fd963 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #74170: locale information change after mime_content_type
2019-12-20 11:24:03 +01:00
Sergei Turchanov
c62cd9a43a Fix #74170: locale information change after mime_content_type
Some functions in libmagic (distributed with fileinfo extension) perform this sequence of calls:
func() {
setlocale(LC_TYPE, "C")
.. do some work ..
setlocale(LC_TYPE, "")
}

It effectively resets LC_TYPE if it that was set before the function call.

To avoid manipulations with current locale at all, the problematic functions
were modified to use locale-independent functions.
2019-12-20 11:22:59 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Máté Kocsis
9493893412 Cleanup return values when parameter parsing is unsuccessful 2019-10-30 16:05:20 +01:00
Stanislav Malyshev
39bf35ca87 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:57 -07:00
Stanislav Malyshev
53b1d76144 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:50 -07:00
Stanislav Malyshev
8c2b3b0568 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:44 -07:00
Stanislav Malyshev
2bdb13a1f7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:30 -07:00
Stanislav Malyshev
469820048d Fix libmagic buffer overflow issue (CVE-2019-18218)
Ported from 46a8443f76
2019-10-27 16:30:38 -07:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Craig Duncan
4836660b90 Convert fileinfo functions arginfo to php stubs
We also allow the context for finfo to be null.
2019-08-26 18:13:58 +02:00
Nikita Popov
429378d78d Remove some misleading RETURN_FALSE
These functions throw, so they can't return false.

This is just a subset...
2019-08-12 10:05:36 +02:00
Nikita Popov
8d39510af8 Merge branch 'PHP-7.4' 2019-07-25 10:43:50 +02:00
Nikita Popov
1cbcf0f4f1 Throw notice for plain wrapper fread/fwrite errors
Similar to what is done for socket read/write errors.
2019-07-25 10:42:10 +02:00
Peter Kokot
fa8a51f140 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update libmagic patch
2019-07-08 12:41:15 +02:00
Peter Kokot
f002761e08 Update libmagic patch
This simplifies the libmagic patch:
- in upstream the HAVE_STRERROR check has been removed
- in upstream library the HAVE_SIGNAL_H has been removed
- indentations syncs with the upstream library
- some irrelevant changes removed from the patch (log comment), upstream
  has this correctly logged already so no need to patch the comment.

Closes GH-4298
2019-07-08 12:38:47 +02:00
Nikita Popov
9ab5c28c8b Merge branch 'PHP-7.4' 2019-07-01 17:28:01 +02:00
Nikita Popov
7acc828abf Skip perf-sensitive fileinfo tests 2019-07-01 17:27:42 +02:00
Anatol Belski
e0112eb4e3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update libmagic.patch [ci skip]
2019-06-29 17:36:39 +02:00
Anatol Belski
dacf9ecc46 Update libmagic.patch [ci skip] 2019-06-29 17:36:11 +02:00
Anatol Belski
5ea43c38b3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Set buffer to NULL to prevent double free (Kamil Dudka at redhat)
2019-06-29 17:19:20 +02:00
Anatol Belski
5ae0a6b784 Set buffer to NULL to prevent double free (Kamil Dudka at redhat)
Based on the upstream patch d13204e8da43f1d8a98cf3f74591cde02ecdb2f7.
2019-06-29 17:13:21 +02:00
Anatol Belski
9f9657ff92 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix magic data
2019-06-29 16:53:10 +02:00
Anatol Belski
02fc2fe8c9 Fix magic data 2019-06-29 16:51:41 +02:00
Anatol Belski
b74d4d2c19 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typo
  Add tests from fix #78183 from PHP-7.2
  Fix #78183: finfo_file shows wrong mime-type for .tga file
2019-06-29 13:31:56 +02:00
Anatol Belski
885cb79201 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix typo
  Add tests from fix #78183 from PHP-7.2
  Fix #78183: finfo_file shows wrong mime-type for .tga file
2019-06-29 13:31:22 +02:00
Anatol Belski
b926690947 Fix typo 2019-06-29 13:30:35 +02:00
Joshua Westerheide
6cdeedb8de Add tests from fix #78183 from PHP-7.2 2019-06-29 13:29:53 +02:00
Joshua Westerheide
855bbc88c9 Fix #78183: finfo_file shows wrong mime-type for .tga file
Due to a bug in the underlying libmagic 5.31, .tga images returned mime type "image/x-tgaimage/x-tga".
2019-06-29 13:24:52 +02:00
Nikita Popov
b98c148f78 Merge branch 'PHP-7.4' 2019-06-28 15:05:00 +02:00
Nikita Popov
54dd762f59 Set up asan+ubsan scheduled build on azure
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.

I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
2019-06-28 15:00:54 +02:00
Peter Kokot
ce12ecd40f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix concurrent testing of bug 61964
2019-06-27 00:27:43 +02:00
Peter Kokot
4ff44a9161 Fix concurrent testing of bug 61964
When tests are run concurrently using the -j option there might be a
change of failure and writing to the same directory from both tests.

Use test filenames for generated temp dirs
2019-06-27 00:27:10 +02:00
Nikita Popov
1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Anatol Belski
1f18a29514 Merge branch 'PHP-7.4'
* PHP-7.4:
  [ci skip] Update libmagic.patch
2019-05-30 14:09:48 +02:00
Anatol Belski
2ba9177d4f [ci skip] Update libmagic.patch 2019-05-30 14:09:00 +02:00
Anatol Belski
bd0834434f Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test for bug #78075, json detection
2019-05-30 13:33:02 +02:00
Anatol Belski
aed9a64cf6 Add test for bug #78075, json detection 2019-05-30 13:31:48 +02:00
Anatol Belski
a6f50eb317 Merge branch 'PHP-7.4'
* PHP-7.4:
  Partially reapply ba40f505e5
2019-05-30 02:48:37 +02:00
Anatol Belski
0c8454c02d Partially reapply ba40f505e5 2019-05-30 02:48:01 +02:00
Anatol Belski
055ed113f7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix datatype
2019-05-30 02:35:28 +02:00
Anatol Belski
57c23df142 Fix datatype 2019-05-30 02:34:35 +02:00
Anatol Belski
8f85961326 Merge branch 'PHP-7.4'
* PHP-7.4:
  Ported limagic 5.37
2019-05-30 02:23:20 +02:00
Anatol Belski
622b10f06e Ported limagic 5.37 2019-05-30 02:22:40 +02:00