Commit Graph

103653 Commits

Author SHA1 Message Date
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
Anatol Belski
21c6ba3412 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase expected timing on Travis
2017-08-03 15:07:47 +02:00
Anatol Belski
9689796c10 Increase expected timing on Travis
If 5ms to read/write 8 bytes still has issue, probably next this test
should skip on Travis to avoid false positive fails.
2017-08-03 15:05:22 +02:00
Anatol Belski
93c2c56a1b Rework automatic interactive cli activation
There are still systems delivering buggy console info. If a file was
passed, obviously no interaction is meant.
2017-08-03 11:23:50 +02:00
Anatol Belski
39f0e810c9 [ci skip] update NEWS 2017-08-02 21:51:35 +02:00
Anatol Belski
fbc8596b68 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  update NEWS
2017-08-02 21:51:01 +02:00
Anatol Belski
54e2224df7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-08-02 21:50:26 +02:00
Anatol Belski
3e5b8c1e89 [ci skip] update NEWS 2017-08-02 21:49:56 +02:00
Anatol Belski
9ba2cfd33e update NEWS 2017-08-02 21:49:21 +02:00
Andreas Treichel
29e4d4eee6 Add ftp_append to create a new file or append data to an existing file (RFC959) 2017-08-02 20:52:28 +02:00
Nikita Popov
aa925cb0ad Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:50:18 +02:00
Nikita Popov
4988e83fe9 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:50:04 +02:00
Andreas Treichel
c2b8066efb Bug #74975: Different serialization for classes 2017-08-02 18:49:26 +02:00
Nikita Popov
042ff13ca9 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:18:23 +02:00
Nikita Popov
9871555090 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:16:56 +02:00
Nikita Popov
9ca1b2a775 Merge remote-tracking branch 'php-src/PHP-7.0' into PHP-7.0 2017-08-02 18:16:18 +02:00
Nikita Popov
91240073ea Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:11:12 +02:00
Nikita Popov
63607375f5 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:09:09 +02:00
Fabien Villepinte
2cc1cbf2f4 Fix Bug #75001: Wrong reflection on mb_eregi_replace 2017-08-02 18:08:42 +02:00
Fabien Villepinte
15abb2b56e Fix test transliterator_create_inverse_basic.phpt 2017-08-02 18:04:43 +02:00
George Wang
e78712791d take care of compile warnings. 2017-08-02 11:59:41 -04:00
Tyson Andre
5097e2ee13 Implement spl_object_id(object $x) : int
spl_object_id is a new function returning the object handle,
as a signed integer.

Discussion for this new function is ongoing on php-internals, see
https://marc.info/?t=143835274500003&r=1&w=2

The object id is unique for the lifetime of the object.
When the object is garbage collected,
different objects may & will have the same object id.

- This is also the case for the string generated by spl_object_hash

It is always possible to cast the object handle to a **signed** zend_long
in php 7.2. _zend_object->handle is always of the type `uint32_t`.
(zend_long is 32 bits on 32 bit builds, 64 bits on 64 bit builds)

As of php 7.0, the object id uniquely identifies the object,
there can't be two objects with the same id but different handlers
(See the implementation of spl_object_hash)

Skip the pointless XORing, as discussed in internals.

- It was intended to avoid exposing in-memory addresses.
- The object handle is not a memory address.
- The output of var_dump() includes the object handle(id)
2017-08-02 17:54:07 +02:00
Anatol Belski
b4bce59fe9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:42:20 +02:00
Anatol Belski
1fdc518971 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:41:48 +02:00
Derick Rethans
b112d09013 Fixed bug #75002 Null Pointer Dereference in timelib_time_clone 2017-08-02 16:40:48 +02:00