1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00
Commit Graph

651 Commits

Author SHA1 Message Date
Anatol Belski 2ba9177d4f [ci skip] Update libmagic.patch 2019-05-30 14:09:00 +02:00
Anatol Belski aed9a64cf6 Add test for bug #78075, json detection 2019-05-30 13:31:48 +02:00
Anatol Belski 0c8454c02d Partially reapply ba40f505e5 2019-05-30 02:48:01 +02:00
Anatol Belski 57c23df142 Fix datatype 2019-05-30 02:34:35 +02:00
Anatol Belski 622b10f06e Ported limagic 5.37 2019-05-30 02:22:40 +02:00
Peter Kokot 75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Peter Kokot 71acd7a2f7 Remove unused example/test fileinfo.php script 2019-05-08 21:58:52 +02:00
Nikita Popov 908660c1d7 Avoid maybe uninit warning in libmagic
GCC 5 false positive, gone in newer versions.
2019-04-15 10:59:45 +02:00
Nikita Popov ba40f505e5 Fix unused variable warnings in libmagic
These variables are only used in assertions.
2019-04-12 12:03:26 +02:00
Nikita Popov b65cb7e2aa Fix libmagic warnings 2019-04-11 15:20:05 +02:00
Nikita Popov f6521659ca Add script to generate libmagic.patch 2019-04-11 15:12:20 +02:00
Nikita Popov 275fa53564 Accept zend_string* instead of char* in php_pcre_match_impl() 2019-03-18 12:32:06 +01:00
Fabien Villepinte b6f9ade9f2 Remove unused variables 2019-03-17 23:29:51 +01:00
Fabien Villepinte 26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Dmitry Stogov 5aa1176238 Cleanup unused module globals 2019-03-12 13:44:05 +03:00
Anatol Belski 591d6b86ab Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update libmagic.patch [skip ci]
2019-03-08 21:55:48 +01:00
Anatol Belski 3e92365fa2 Update libmagic.patch [skip ci] 2019-03-08 21:55:15 +01:00
Anatol Belski 93a38b1f7c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix typo in libmagic version
2019-03-08 21:45:18 +01:00
Fabien Villepinte d9a3cb0b36 Fix typo in libmagic version 2019-03-08 20:51:09 +01:00
Anatol Belski c8ebfaa4eb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #77576 pull the libmagic implementation of gmtime_r
2019-03-08 20:48:24 +01:00
Anatol Belski 65ffdc2adf Fixed bug #77576 pull the libmagic implementation of gmtime_r
PHP already has all the checks to handle the *_r function variants.
Thus, reusing it to get right symbols.
2019-03-08 20:32:15 +01:00
Peter Kokot 9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov c8e10c6119 More zpp error/variation test removals 2019-03-07 15:54:31 +01:00
Rodrigo Prado 34ca922125 Small change in the test to pass
This test was not passing because the VM called by travis CI is slow, see below the failure:
http://gcov.php.net/viewer.php?version=PHP_HEAD&func=tests&file=ext%2Ffileinfo%2Ftests%2Fcve-2014-3538-mb.phpt
User Group: PHPSP #phptestfestbrasil
http://phpsp.org.br/
2019-02-14 20:12:00 +01:00
Peter Kokot 92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski 0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Anatol Belski a11e7d2c1f Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #77346 webm files incorrectly detected as application/octet-stream
2018-12-28 13:27:31 +01: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
Nikita Popov 27e9c05e81 Remove preg_options param from pcre_get_compiled_regex()
This parameter is always zero and not necessary to call pcre2_match.

I'm leaving the parameter behind on the _ex() variant, so the preg_flags
are still accessible in some way.
2018-12-26 17:20:13 +01:00
Anatol Belski 164edffb99 Merge branch 'PHP-7.3'
* PHP-7.3:
  Rework magic data once more
2018-11-14 22:35:47 +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
Dmitry Stogov c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +03:00
Anatol Belski 1c873c1191 Merge branch 'PHP-7.3'
* PHP-7.3:
  Update libmagic.patch [ci skip]
  Update libmagic.patch [ci skip]
2018-11-10 22:03:07 +01:00
Anatol Belski ee50461e4b Update libmagic.patch [ci skip] 2018-11-10 22:02:44 +01:00
Anatol Belski 854691922a Merge branch 'PHP-7.3'
* PHP-7.3:
  Fork test with pcre.jit=0
2018-11-10 20:07:52 +01:00
Anatol Belski b50d93bc11 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fork test with pcre.jit=0
2018-11-10 20:07:25 +01:00
Anatol Belski 3fd46e19ac Fork test with pcre.jit=0 2018-11-10 20:06:47 +01:00
Anatol Belski d0226995c9 Merge branch 'PHP-7.3'
* PHP-7.3:
  Rework magic data
2018-11-10 18:26:04 +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 3c0ac24258 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix regex
  Fix regex
2018-11-10 12:13:29 +01:00
Anatol Belski 992e4fbc65 Fix regex 2018-11-10 12:13:03 +01:00
Anatol Belski 9d77bf0978 Fix regex 2018-11-10 12:11:02 +01:00
Anatol Belski 60adea5496 Rework magic data
Avoid patching where vanilla data suffices. More precisely, avoid data
using [:space:] posix class in regex, as it is likely to cause performance
regressions.
2018-11-10 01:28:23 +01:00
Anatol Belski 22f71a66ec Sync one more upstream libmagic piece 2018-11-10 00:19:42 +01:00
Anatol Belski 2e336329e0 Merge branch 'PHP-7.3'
* PHP-7.3:
  Update libmagic.patch [ci skip]
  Update libmagic.patch [ci skip]
2018-11-05 22:25:54 +01:00
Anatol Belski a957af6c06 Update libmagic.patch [ci skip] 2018-11-05 22:25:31 +01:00
Anatol Belski dbb2cce968 Update libmagic.patch [ci skip] 2018-11-05 22:24:27 +01:00
Anatol Belski 956708acac Merge branch 'PHP-7.3'
* PHP-7.3:
  Declare function proto in header
  Declare function proto in header
2018-11-05 21:30:02 +01:00
Anatol Belski 29dcf19f8b Declare function proto in header 2018-11-05 21:29:35 +01:00
Anatol Belski 0e33c2822c Declare function proto in header 2018-11-05 21:28:04 +01:00