Commit Graph

103877 Commits

Author SHA1 Message Date
Nikita Popov
a871badf2a Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 13:17:24 +02:00
Nikita Popov
4fb7665c09 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 13:15:48 +02:00
Nikita Popov
1a23ebc1ff Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.

What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).

Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00
Andrea Faulds
f877b86604 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 01:38:46 +01:00
Andrea Faulds
e88ab74886 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 01:37:47 +01:00
Andrea Faulds
b59718bdc4 Fix bug #74725 (html_errors=1 breaks unhandled exceptions) 2017-08-12 01:37:20 +01:00
Xinchen Hui
aecf996510 Fixed live_range removing (bug can be triggred by JIT) 2017-08-11 21:56:30 +08:00
Jakub Zelenka
e53dd027c5 Reset utf8_invalid in json scanner 2017-08-10 19:47:58 +01:00
Jakub Zelenka
f5b4cb7130 Fix possible overflow in json scanner utf8_invalid_count 2017-08-10 19:40:02 +01:00
Xinchen Hui
4375a6c5cd Fixed type infer for FUNC_GET_ARGS 2017-08-11 00:33:55 +08:00
Xinchen Hui
f7cf839213 Update NEWs 2017-08-09 11:29:54 +08:00
Xinchen Hui
e7dd9c781b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:46 +08:00
Xinchen Hui
46ecda76ba Update NEWS 2017-08-09 11:29:32 +08:00
Xinchen Hui
307acb6618 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:13 +08:00
Xinchen Hui
b06f8cb58b Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results) 2017-08-09 11:28:53 +08:00
Anatol Belski
823ca5c697 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove mistakingly added line
2017-08-08 19:40:42 +02:00
Anatol Belski
42608a3401 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove mistakingly added line
2017-08-08 19:40:28 +02:00
Anatol Belski
afb20f4895 Remove mistakingly added line 2017-08-08 19:37:55 +02:00
Anatol Belski
e62db6309c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync makefile options for phpize
2017-08-08 17:59:44 +02:00
Anatol Belski
315d3910fa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync makefile options for phpize
2017-08-08 17:59:15 +02:00
Anatol Belski
075986f214 Sync makefile options for phpize
- run target
- debugger mode
2017-08-08 17:58:10 +02:00
Frank Denis
ef0bd7b215 sodium ext: Use _ietf_ vs _IETF_ consistently 2017-08-08 17:50:17 +02:00
Frank Denis
03314e3f69 sodium ext: No need for #ifdef crypto_aead_chacha20poly1305_IETF_
chacha20poly1305_ietf was implemented in libsodium 1.0.4 which is way earlier
than the minimum version we support.
2017-08-08 17:42:38 +02:00
Frank Denis
596a892c5e Sodium ext: Isolate a return statement for consistency 2017-08-08 17:38:13 +02:00
Frank Denis
a0d1e0915c sodium ext: The default password hashing function is not supposed to be Argon2i 2017-08-08 17:37:06 +02:00
Frank Denis
631fc3c9c1 sodium ext: long -> zend_long 2017-08-08 17:36:06 +02:00
Frank Denis
3140d40421 sodium ext: Add missing "return" statements after zend_throw_exception() 2017-08-08 17:34:20 +02:00
Darek Slusarczyk
abd97b8bcb Merge branch 'PHP-7.1' into PHP-7.2
# Conflicts:
#	ext/json/config.w32
2017-08-08 16:08:19 +02:00
Darek Slusarczyk
86aa1ca990 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-08 16:05:13 +02:00
Darek Slusarczyk
618dcd6520 JSON: fix config.w32 / Install headers on windows 2017-08-08 15:52:53 +02:00
Andrey Hristov
f589e5c791 Add new enum options defined in MySQL 5.7 2017-08-08 14:57:01 +03:00
Anatol Belski
dcd669b4d9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Unify EOL
2017-08-07 17:04:15 +02:00
Anatol Belski
9ebf813ea4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Unify EOL
2017-08-07 17:03:54 +02:00
Anatol Belski
4c9fe5a490 Unify EOL 2017-08-07 17:03:17 +02:00
Anatol Belski
d36344e888 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix test target for phpize
2017-08-07 16:45:57 +02:00
Anatol Belski
da966a93ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test target for phpize
2017-08-07 16:45:41 +02:00
Anatol Belski
d058e30917 fix test target for phpize 2017-08-07 16:45:02 +02:00
Jakub Zelenka
41d7621f48 Fix segfault in json ignoring of invalid UTF8 2017-08-06 17:20:31 +01:00
Nikita Popov
6b73b2d6eb Check for empty string in mb_ord() 2017-08-04 22:20:05 +02:00
Côme Chilliet
aa0e402acf Added controls parameters to ldap_exop so that control support can be added later 2017-08-04 18:10:49 +02:00
Remi Collet
17bb8d575a win32 for pdo_sqlite 2017-08-04 13:28:48 +02:00
Remi Collet
bf1c242cf4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  use AC_DEFINE + win32
2017-08-04 13:21:54 +02:00
Remi Collet
aee20e637a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use AC_DEFINE + win32
2017-08-04 13:21:41 +02:00
Remi Collet
159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Nikita Popov
353f7bf461 Also check for invalid codepoints in mb_ord()
And return false in that case, instead of returning 0x3f...
2017-08-04 13:01:03 +02:00
Nikita Popov
e53162a32b Return false on invalid codepoint in mb_chr()
Instead of returning the encoding of the current substitution
character. This allows a robust check for the failure case. The
substitution character (especially the default of "?") is also
a valid output of mb_chr() for a valid input (for "?" that would be
0x3f), so it's a bad choice for an error value.
2017-08-03 22:36:42 +02:00
Nikita Popov
41e9ba6333 Always use Unicode codepoints in mb_ord() and mb_chr()
Previously mb_chr() had two different encoding-dependent behaviors:
 * For "Unicode-encodings" it took a Unicode codepoint and returned
   its encoded representation.
 * Otherwise it returned a big-endian binary encoding of the passed
   integer.

Now the input is always interpreted as a Unicode codepoint. If
a big-endian binary encoding is what you want, you don't need
mbstring to implement that.
2017-08-03 22:14:00 +02:00
Nikita Popov
fb9bf5b64b Revert/fix substitution character fallback
The introduced checks were not correct in two respects:
 * It was checked whether the source encoding of the string matches
   the internal encoding, while the actually relevant encoding is
   the *target* encoding.
 * Even if the correct encoding is used, the checks are still too
   conservative. Just because something is not a "Unicode-encoding"
   does not mean that it does not map any non-ASCII characters.

I've reverted the added checks and instead adjusted mbfl_convert
to first try to use the provided substitution character and if
that fails, perform the fallback to '?' at that point. This means
that any codepoint mapped in the target encoding should now be
correctly supported and anything else should fall back to '?'.
2017-08-03 21:53:59 +02:00
Nikita Popov
a8a9e93e9a Revert/fix mb_substitute_character() codepoint checks
The introduced checks did not treat "non-Unicode" encodings correctly,
because they treated the passed integer as encoded in the internal
encoding in that case, while in actuality the substitute character
is always a Unicode codepoint.

Additionally checking the codepoint against the internal encoding
is not correct in any case, because the substitution character must
be mapped in the *target* encoding of the conversion, which does
not necessarily coincide with the internal encoding (the internal
encoding is the default *source* encoding, not *target* encoding).

This reverts the checks back to simple range checks, but in a way
that still resolves #69079: Characters outside the Basic
Multilingual Plane are now accepted and Surrogate Codepoints are
rejected. A distinction between UTF-8 and non-UTF-8 encodings is
not made for surrogate checks (as in the original patch), as
surrogates are always illegal on their own. Specifying a surrogate
as substitution character would only make sense if you could
specify a substitution string with more than one character --
however we do not support that.
2017-08-03 21:12:41 +02:00
Anatol Belski
355743600d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Increase expected timing on Travis
2017-08-03 15:08:05 +02:00