Commit Graph

32 Commits

Author SHA1 Message Date
Anatol Belski
34fa65a6c2 fileinfo: magic: Backport mime type support for woff/woff2 fonts
Upstream patch: 7a821aedc1

Fixes GH-8805.

Signed-off-by: Anatol Belski <ab@php.net>
(cherry picked from commit 8a2ebe069148909a00739c83e9bcc031734bf826)
2022-09-18 14:39:12 +02:00
Anatol Belski
3b9173dc8f fileinfo: Port libmagic 5.40
Signed-off-by: Anatol Belski <ab@php.net>
2021-04-05 20:19:07 +02:00
Anatol Belski
bf93f1d824 fileinfo: Followup fixes
Signed-off-by: Anatol Belski <ab@php.net>
2020-08-29 19:03:41 +02:00
Anatol Belski
c3eeab01ba fileinfo: Upgrade to libmagic 5.39
Signed-off-by: Anatol Belski <ab@php.net>
2020-08-29 02:05:56 +02:00
Christoph M. Becker
6747068ce7 Fix #79681: mime_content_type/finfo returning incorrect mimetype
We backport the respective fix for MP3s[1].

[1] <5a55569a35>
2020-06-10 16:36:40 +02:00
Anatol Belski
02fc2fe8c9 Fix magic data 2019-06-29 16:51:41 +02:00
Anatol Belski
622b10f06e Ported limagic 5.37 2019-05-30 02:22:40 +02:00
Anatol Belski
d874d4a15c Fixed bug #77346 webm files incorrectly detected as application/octet-stream
HEADSUP data from file 5.34 is used from now on
2018-12-28 13:25:40 +01:00
Anatol Belski
2a062f3c02 Rework magic data once more
The change reduces the input size on patterns using posix character
classes. It is still better than reverting to the patterns from the
older version, as the upstream data uses posix classes also in the later
versions. The input reduction speeds up the pattern matching in some
cases.

This patch is functionally almost same as upstream, but might show some diff
when the input is very long. While the magic data in the newer versions is
functionally an improvement, with jit=0 it might show a performance regression.
The slowdown is negligible in the normal usage and is still acceptable for the
malicious input. If some functional regressions show up, this patch should be
reverted and the tests timing should be adapted instead.
2018-11-14 22:23:24 +01:00
Anatol Belski
0e38909170 Rework magic data
Still upstream contains some slower patterns. Those might need to
be patched, if regressions arise.
2018-11-10 18:22:44 +01:00
Anatol Belski
e2182a1ba7 Port libmagic 5.33 2018-04-29 16:02:08 +02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Anatol Belski
08d8623dec Upgrade bundled libmagic to 5.31 2017-10-11 18:18:55 +02:00
Anatol Belski
31a3956053 apply the current Fedora's data patches 2016-11-24 17:43:16 +01:00
Anatol Belski
411e97c72d Upgraded libmagic to 5.29
yet unfinished port to libmagic 5.28

catch with missing libmagic port pieces

regenerate data file with magic from 5.28

test magic files from 5.28

missing files

fix path

pure c99 is still not supported

move right to 5.29, yet some bugs present

more sync with orig lib

more ZMM usage

use unpatched data for now

partial revert according to bug #67705

Revert "more ZMM usage"

This reverts commit 5e3c9b851034b455942b219b18bdc49c8315c3ee.

several fixes, so it's now closer to the clean port
2016-11-24 13:44:04 +01:00
Anatol Belski
bae44417a8 after merge fix 2015-03-08 19:56:31 +01:00
Anatol Belski
eeb74b0ab8 regenerated data file 2015-03-08 19:47:53 +01:00
Anatol Belski
1b77e51ad7 started to patch for libmagic.next
everything is broken yet
2015-03-08 19:47:38 +01:00
Anatol Belski
969ce2e877 regenerated data file 2015-03-08 19:47:21 +01:00
Anatol Belski
2181ed2e2a started to patch for libmagic.next
everything is broken yet
2015-03-08 19:47:06 +01:00
Anatol Belski
c9d0894ec5 Fixed bug #67647 Bundled libmagic 5.17 does not detect quicktime files correctly 2015-01-22 11:48:11 +01:00
Anatol Belski
41a2f7074d Fixed bug #68398 msooxml matches too many archives 2014-12-06 20:51:00 +01:00
Andrey Hristov
3dc9bef819 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/fileinfo/data_file.c
	ext/fileinfo/libmagic/softmagic.c
	ext/fileinfo/magicdata.patch
2014-08-06 16:25:12 +03:00
Stanislav Malyshev
eeaec70758 Fix bug #67705 (extensive backtracking in rule regular expression) 2014-08-04 00:05:40 -07:00
Remi Collet
4374a52e9d Fixed bug #66946 extensive backtracking in awk rule regular expression
CVE-2013-7345

Applied upstream patch:
ef2329cf71

Add the magicdata.patch to track patches applied to upstream data file.
2014-03-25 11:00:33 +01:00
Anatol Belski
967a6771d3 updated to libmagic-5.17 2014-02-19 10:02:36 +01:00
Anatol Belski
10367fa7c6 upgraded libmagic to 5.14 2013-04-07 22:15:56 +02:00
Pierre Joye
12cf930a40 Fix bug #61504, potential vuln. in fileinfo. update to 5.11 2012-03-27 13:34:46 +02:00
Scott MacVicar
c48241a569 MFH Update libmagic data file to 5.02 2009-05-04 20:56:13 +00:00
Scott MacVicar
7a29c8f386 MFH Update fileinfo to libmagic 5.00 and remove dependency on dirent.h on Windows 2009-03-15 23:04:19 +00:00
Scott MacVicar
3e543f2464 MFH: Sync libmagic with 4.26 and add support for the new v6 magic file format 2008-11-02 16:13:49 +00:00
SVN Migration
14ce4a1d0a This commit was manufactured by cvs2svn to create branch 'PHP_5_3'. 2008-07-25 02:44:58 +00:00