1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

1011 Commits

Author SHA1 Message Date
Stanislav Malyshev 434c2b1bdb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77423: parse_url() will deliver a wrong host to user
2021-01-01 21:29:08 -08:00
Stanislav Malyshev 128fca4037 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77423: parse_url() will deliver a wrong host to user
2021-01-01 21:06:07 -08:00
Christoph M. Becker 2d3d72412a Fix #77423: parse_url() will deliver a wrong host to user
To avoid that `parse_url()` returns an erroneous host, which would be
valid for `FILTER_VALIDATE_URL`, we make sure that only userinfo which
is valid according to RFC 3986 is treated as such.

For consistency with the existing url parsing code, we use ctype
functions, although that is not necessarily correct.
2021-01-01 20:08:01 -08:00
Christoph M. Becker 5ab7b30cd6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79986: str_ireplace bug with diacritics characters
2020-08-24 11:09:38 +02:00
Christoph M. Becker 844a2dd6ac Fix #79986: str_ireplace bug with diacritics characters
`tolower()` returns an `int`, so we must not convert to `char` which
may be `signed` and as such may be subject to overflow (actually,
implementation defined behavior).

Closes GH-6007
2020-08-24 11:08:48 +02:00
Nikita Popov 66d9f4d985 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79951
2020-08-11 10:35:25 +02:00
Nikita Popov 9d9dffe60a Fixed bug #79951
One branch did not release tmp_replace_entry_str.

Also reduce the scope of some variables.
2020-08-11 10:33:59 +02:00
Nikita Popov b6e45b58d7 Relax error message check 2020-08-05 10:39:17 +02:00
Nikita Popov ee75524bff Check whether setlocale -a is available 2020-08-05 10:38:59 +02:00
Christoph M. Becker c1b5e7a9ab Enable further tests on Windows 2020-07-16 16:07:23 +02:00
Christoph M. Becker ef54899fd1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add basic sapi_windows_cp_conv() test
2020-05-04 11:50:50 +02:00
Christoph M. Becker d950969e59 Add basic sapi_windows_cp_conv() test
This function is lacking any tests so far.
2020-05-04 11:50:03 +02:00
Nikita Popov c247898949 Fix test
Hopefully (32-bit)
2020-01-13 10:09:58 +01:00
Nikita Popov e748a5a0e6 Remove unnecessary whitespace sensitivtiy from some tests 2020-01-10 17:36:46 +01:00
Christoph M. Becker 3356dd0575 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:39:35 +01:00
Christoph M. Becker 861fa60814 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:38:45 +01:00
Christoph M. Becker 600f1f898f Fix #78814: strip_tags allows / in tag name => whitelist bypass
When normalizing tags to check whether they are contained in the set
of allowable tags, we must not strip slashes, unless they come
immediately after the opening `<`, or immediately before the closing
`>`.
2019-12-02 11:37:25 +01:00
Christoph M. Becker 4ff242a9a7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:07 +01:00
Christoph M. Becker 3d81c54879 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:19:15 +01:00
Christoph M. Becker db420cb6a1 Fix #78833: Integer overflow in pack causes out-of-bound access
We check for potential signed integer overflow, and bail out
gracefully, in that case.
2019-12-02 11:18:19 +01:00
Christoph M. Becker 30aa2e8932 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78840: imploding $GLOBALS crashes
2019-11-27 09:33:55 +01:00
Christoph M. Becker fee38633d2 Fix #78840: imploding $GLOBALS crashes
We add support for IS_INDIRECT zvals to implode().
2019-11-27 09:32:16 +01:00
Christoph M. Becker 6627f782d6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-04 09:11:18 +02:00
Christoph M. Becker cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Nikita Popov 1f0ffece91 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-30 15:06:43 +02:00
Nikita Popov 0805e132b0 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-30 15:06:32 +02:00
Nikita Popov 6fcde56b03 Fixed bug #78612 2019-09-30 15:06:07 +02:00
Nikita Popov bad49e55b9 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 10:27:08 +02:00
Nikita Popov a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov 16d35eb643 Fix overflow in memory limit checks
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
2019-08-26 10:25:30 +02:00
Christoph M. Becker f12dc90e5e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78346: strip_tags no longer handling nested php tags
2019-08-02 17:04:36 +02:00
Christoph M. Becker a87ef5e3dd Fix #78346: strip_tags no longer handling nested php tags
When the strip tags state machine has been flattened, an if statement
has mistakenly been treated as else if.  We fix this, and also simplify
a bit right away.
2019-08-02 17:03:20 +02:00
Nikita Popov b3f74b0b7d Deprecate allow_url_include 2019-07-22 11:39:52 +02:00
Nikita Popov b3668aabf7 Deprecate convert_cyr_string() 2019-07-22 11:39:52 +02:00
Nikita Popov 46b982409a Deprecate implode() with swapped parameter order 2019-07-22 11:39:52 +02:00
Nikita Popov b1cdf06673 Deprecate money_format() 2019-07-22 11:39:52 +02:00
Nikita Popov 4e4d8a4a6c Deprecate hebrevc() 2019-07-22 11:39:52 +02:00
Nikita Popov 3121b7174f Deprecate Reflection export() methods
And remove the Reflector::export() interface method.
2019-07-22 11:39:52 +02:00
George Peter Banyard 3a5664fdfe Convert E_STRICT into E_NOTICE for htmlentities() function 2019-07-18 11:13:18 +02:00
Nikita Popov 0c450967e1 Simplify two unserialize() tests
unserialize() returns false for these now, so it doesn't make sense
to try and do something with the result.
2019-07-10 11:09:54 +02:00
Peter Kokot 638c21765c Remove HAVE_STRCOLL check
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00
George Peter Banyard 7f5f277cf2 Remove unnecessary short_open_tag INI directive in tests
Closes GH-4249.
2019-06-11 16:14:10 +02:00
Christoph M. Becker 27e592d3ce Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77937: preg_match failed
2019-06-11 08:44:54 +02:00
Christoph M. Becker b215d1339f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77937: preg_match failed
2019-06-11 08:44:07 +02:00
Christoph M. Becker f3ff72e54b Fix #77937: preg_match failed
On some recent Windows systems, ext\pcre\tests\locales.phpt fails,
because 'pt_PT' is accepted by `setlocale()`, but not properly
supported by the ctype functions, which are used internally by PCRE2 to
build the localized character tables.

Since there appears to be no way to properly check whether a given
locale is fully supported, but we want to minimize BC impact, we filter
out typical Unix locale names, except for a few cases which have
already been properly supported on Windows.  This way code like

  setlocale(LC_ALL, 'de_DE.UTF-8', 'de_DE', 'German_Germany.1252');

should work like on older Windows systems.

It should be noted that the locale names causing trouble are not (yet)
documented as valid names anyway, see
<https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=vs-2019>.
2019-06-11 08:42:32 +02:00
Nikita Popov a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Gabriel Caruso 714d9fc358 Make chr ZPP failure message consistent with ext/standard 2019-05-18 15:59:07 -03:00
Peter Kokot f1a53501e6 Rename *.dat to *.data for common file type
File extension in this case is not part of the test.
2019-05-14 23:31:42 +02:00
Christoph M. Becker 2e8518fdcf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78003: strip_tags output change since PHP 7.3
2019-05-13 13:11:07 +02:00