Commit Graph

78503 Commits

Author SHA1 Message Date
Tjerk Meesters
8d3f4b647b Merge branch 'PHP-5.5' into PHP-5.6 2014-03-07 19:24:02 +08:00
Tjerk Meesters
972935cd95 Fixed null termination 2014-03-07 19:23:46 +08:00
Tjerk Meesters
25d355bdb7 Updated NEWS for #65545 2014-03-07 18:57:55 +08:00
Tjerk Meesters
64906cdc38 Merge branch 'PHP-5.5' into PHP-5.6 2014-03-07 18:57:36 +08:00
Tjerk Meesters
091b7f841b Updated NEWS for #65545 2014-03-07 18:51:16 +08:00
datibbaw
3c673fed34 Add fread(length) method
Fixed off-by-one write bug

Added test
2014-03-07 18:50:33 +08:00
Bob Weinand
f76d5b3104 Include the T_POW operator in constant scalar expressions 2014-03-07 07:39:20 +01:00
Tjerk Meesters
be8a4474d9 Updated news for #66822 2014-03-07 09:14:27 +08:00
Tjerk Meesters
3d1fa4cb17 Allow T_POW in constant expressions 2014-03-07 09:14:27 +08:00
Christopher Jones
d32e180f20 Fix typo 2014-03-06 16:49:11 -08:00
Michael M Slusarz
b88387d341 Fix #66698: Add fnv1a32 and fnv1a64 hash options 2014-03-06 23:38:51 +01:00
Nikita Popov
200c97829d Merge branch 'PHP-5.5' into PHP-5.6 2014-03-06 23:15:30 +01:00
Nikita Popov
ecf7570072 Merge branch 'PHP-5.4' into PHP-5.5 2014-03-06 23:12:41 +01:00
Dmitry Panin
e2fc6b52f0 Fix HTML entity table generation 2014-03-06 23:10:31 +01:00
Andrey Andreev
eb8dfc85ce Add test for bug #62102 / RFC 2144
Using test vectors from RFC 2144, section B.1 (http://tools.ietf.org/rfc/rfc2144.txt)
2014-03-06 22:40:26 +01:00
Christopher Jones
9989af2e9b Whitespace. 2014-03-06 10:21:36 -08:00
Christopher Jones
2cf9560921 Misc cleanup including adding the version number 2014-03-06 10:16:42 -08:00
Remi Collet
a8121ca0e1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix order in NEWS
  Add CVE ref (not known at release time)
  Fix NEWS for 5.5.11 fix (really not in 5.5.10)
  5.5.10 release date for NEWS
2014-03-06 11:02:40 +01:00
Remi Collet
70dd3f1731 Fix order in NEWS 2014-03-06 10:55:10 +01:00
Remi Collet
9acdf71194 Add CVE ref (not known at release time) 2014-03-06 10:54:18 +01:00
Remi Collet
cab1894b81 Fix NEWS for 5.5.11 fix (really not in 5.5.10) 2014-03-06 10:53:07 +01:00
Julien Pauli
b31a9cd4da 5.5.10 release date for NEWS 2014-03-06 10:18:10 +01:00
Remi Collet
518a6ed95b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:30 +01:00
Remi Collet
7d5c11c235 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:16 +01:00
Remi Collet
721b9a7c8d Set default Digest Message to use SHA1 instead of MD5 in openssl tests
as MD5 signature are now rejected by newer openssl Version.

Noticed in RHEL-7 and Fedora 21 build.
2014-03-06 10:14:08 +01:00
Daniel Lowrey
a9cdf2e2e3 Add NEWS/UPGRADING notes (openssl + curl) 2014-03-05 10:49:21 -07:00
Daniel Lowrey
fad14e3180 Add encrypted server SNI support
- New "SNI_server_certs" context option maps host names to
  appropriate certs should client handshakes advertise the
  SNI extension:

    $ctx = stream_context_create(["ssl" => [
        "local_cert" => "/path/to/cert.pem",
        "SNI_server_certs" => [
            "domain1.com" => "/path/to/domain1.pem",
            "*.domain2.com" => "/path/to/domain2.pem",
            "domain3.com" => "/path/to/domain3.pem"
        ]
    ]]);

- Prefixing a "*." will utilize the matching cert if a client
  requests the primary host name or any subdomain thereof. So
  in the above example our "domain2.pem" will be used for both
  requests to "domain2.com" -and- "subdomain.domain2.com"
- The "SNI_server_certs" ctx option has no effect for client
  streams.
- SNI support is enabled by default as of 5.6 for both servers
  and clients. Servers must specify the "SNI_server_certs" array
  to actually use the SNI extension, though.
- If the `"SNI_enabled" => false` ctx option is also passed then
  "SNI_server_certs" has no effect.
- While supporting SNI by itself is enough to successfully
  negotiate the TLS handshake with many clients, servers MUST
  still specify a "local_cert" ctx option or run the risk of
  connection failures from clients that do not support the SNI
  extension.
2014-03-05 10:03:33 -07:00
datibbaw
020e161966 Raise timeout to 2s, reworded ssl timeout warning 2014-03-05 10:03:23 -07:00
Daniel Lowrey
27849c998a Refactor + reorganize openssl files
- All streams-related code now lives in xp_ssl.c. Previously
  stream code was split across both openssl.c and xp_ssl.c
- Folded superfluous php_openssl_structs.h into xp_ssl.c
- Server-specific options now set on SSL_CTX instead of SSL
- Deprecate SNI_server_name ctx option
- Miscellaneous refactoring
2014-03-05 10:03:11 -07:00
Andrey Hristov
36d3c83abd Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6 2014-03-05 16:47:16 +02:00
Nikita Popov
d595502d0a Add NEWS entry for mcrypt changes 2014-03-05 15:36:00 +01:00
Nikita Popov
d8ed84e4c4 Use zpp for accepting encryption mode string
Leaving the non-zpp usage for the mcrypt_{MODE} functions, as
they're deprecated and I'm too lazy to update all their tests.
2014-03-05 15:32:32 +01:00
Nikita Popov
eb0eac75ef Remove a number of macros that are no longer used 2014-03-05 15:32:32 +01:00
Nikita Popov
e5738d3bc9 Provide expected IV length in IV error messages 2014-03-05 15:32:32 +01:00
Nikita Popov
b9737aa08e Call mcrypt_module_close on error 2014-03-05 15:32:32 +01:00
Nikita Popov
e4876ecbfb Print supported key sizes in error message 2014-03-05 15:32:32 +01:00
Nikita Popov
32333abe3e Clean up do_crypt code
Avoid unnecessary alloc/copy/free cycles and clean up structure in
general. Add a few extra checks for the key length.
2014-03-05 15:32:32 +01:00
Nikita Popov
a861a3a93d Abort on invalid key size
Previously an incorrectly sized key was either silently padded
with NUL bytes or truncated. Especially the silent nature of this
behavior makes it extremely easy to use weak encryption. A common
mistake - which has also been extensively made in our tests - is
to use a password instead of a key.

Incorrectly sized keys will now be rejected.
2014-03-05 15:32:32 +01:00
Nikita Popov
25d801f97e Abort on missing IV if the enc_mode requires it
Previously the code fell back on using a NUL IV if no IV was
passed and the encryption mode required it. This is dangerous and
makes no sense from a practical point of view (as you could just
as well use ECB then).
2014-03-05 15:32:31 +01:00
Nikita Popov
c4b7cdb41e Abort on invalid IV size
Previously, if the size of the IV did not match the block size
mcrypt would throw a warning and fall back to a NUL IV. This
behavior is both dangerous and makes no practical sense.

mcrypt_encrypt etc. will now return false if the IV has an incorrect
size.
2014-03-05 15:32:31 +01:00
Andrey Hristov
6b804b96b8 Refactor the result set data structures. Move more to the buffered and unbuffered
substructures. Add methods to these too. Preparing for pluggable interface for
returning data to the engine (zvals, c-style, something else)
2014-03-05 16:22:23 +02:00
Remi Collet
1b922895fc NEWS 2014-03-05 10:45:50 +01:00
Remi Collet
cf89ff3d24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
2014-03-05 10:44:04 +01:00
Remi Collet
515c103a08 NEWS 2014-03-05 10:43:45 +01:00
Remi Collet
af09d8b96a Fixed Bug #66815 imagecrop(): insufficient fix for NULL defer CVE-2013-7327
This amends commit 8f4a537, which aimed to correct NULL dereference because of
missing check of gdImageCreateTrueColor() / gdImageCreate() return value.  That
commit checks for negative crop rectangle width and height, but
gdImageCreate*() can also return NULL when width * height overflows.  Hence
NULL deref is still possible, as gdImageSaveAlpha() and gdImagePaletteCopy()
is called before dst == NULL check.

This moves NULL check to happen right after gdImageCreate*().  It also removes
width and height check before gdImageCreate*(), as the same check is done by
image create functions (with an extra warning).

From thoger redhat com
2014-03-05 10:40:36 +01:00
Remi Collet
9a9add6b73 fix merge 2014-03-04 20:39:00 +01:00
Remi Collet
014b95a0a7 NEWS 2014-03-04 20:36:31 +01:00
Remi Collet
5d08cae346 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66820 out-of-bounds memory access in fileinfo
2014-03-04 20:36:08 +01:00
Remi Collet
c2a9f73c99 NEWS 2014-03-04 20:35:56 +01:00
Remi Collet
a33759fd27 Fixed Bug #66820 out-of-bounds memory access in fileinfo
Upstream fix:
447558595a

Notice, test changed, with upstream agreement:
-define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >= ((n) - (o)))
+define OFFSET_OOB(n, o, i)	((n) < (o) || (i) >  ((n) - (o)))
2014-03-04 20:32:52 +01:00