mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 10:25:41 +00:00
Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0658e65f64 | ||
|
|
fdb9b6e5ec | ||
|
|
cbf5581d82 | ||
|
|
b79d2285df | ||
|
|
a80cec1190 | ||
|
|
b04159eed4 | ||
|
|
786234d351 | ||
|
|
f275fdcf00 | ||
|
|
6f14b5ab41 | ||
|
|
9f251548ae | ||
|
|
9d84f6c06e | ||
|
|
7ce88b2d8a | ||
|
|
832c21cabf | ||
|
|
5cc851e83e | ||
|
|
19524fc6fe | ||
|
|
35101e9ef4 | ||
|
|
6188674f1e |
No files matched your search
@@ -1,12 +1,27 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2014, PHP 5.4.26
|
||||
20 Feb 2014, PHP 5.4.26 RC1
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #65753 (JsonSerializeable couldn't implement on module extension)
|
||||
(chobieeee@php.net)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #66731 (file: infinite recursion). (CVE-2014-1943) (Remi)
|
||||
|
||||
- LDAP:
|
||||
. Implemented ldap_modify_batch (https://wiki.php.net/rfc/ldap_modify_batch).
|
||||
(Ondřej Hošek)
|
||||
|
||||
?? ??? 2014, PHP 5.4.25
|
||||
- Openssl:
|
||||
. Fixed bug #66501 (Add EC key support to php_openssl_is_private_key).
|
||||
(Mark Zedwood)
|
||||
|
||||
- Pgsql:
|
||||
. Added warning for dangerous client encoding and remove possible injections
|
||||
for pg_insert()/pg_update()/pg_delete()/pg_select(). (Yasuo)
|
||||
|
||||
06 Feb 2014, PHP 5.4.25
|
||||
|
||||
- Core:
|
||||
. Fixed bug #66286 (Incorrect object comparison with inheritance). (Nikita)
|
||||
|
||||
@@ -139,7 +139,7 @@ Rolling a stable release
|
||||
1. Checkout your release branch, you should have created when releasing previous RC
|
||||
and bump the version numbers in ``main/php_version.h``, ``configure.in`` and possibly ``NEWS``.
|
||||
|
||||
2. If a CVE commit needs to be merged to the release, then have it commited to
|
||||
2. If a CVE commit needs to be merged to the release, then have it committed to
|
||||
the base branches and merged upwards as usual (f.e commit the CVE fix to 5.3,
|
||||
merge to 5.4, 5.5 etc...). Then you can cherry-pick it in your release branch.
|
||||
Don't forget to update NEWS manually in an extra commit then.
|
||||
|
||||
+2
-2
@@ -33,14 +33,14 @@ ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'
|
||||
if test -z "$ac_version"; then
|
||||
echo "buildconf: autoconf not found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build PHP from SVN."
|
||||
echo " to build PHP from Git."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $ac_version; IFS=' '
|
||||
if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version 2.59 or newer installed"
|
||||
echo " to build PHP from SVN."
|
||||
echo " to build PHP from Git."
|
||||
exit 1
|
||||
else
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=4
|
||||
PHP_RELEASE_VERSION=26
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ file_ascmagic_with_encoding(struct magic_set *ms, const unsigned char *buf,
|
||||
== NULL)
|
||||
goto done;
|
||||
if ((rv = file_softmagic(ms, utf8_buf,
|
||||
(size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
|
||||
(size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
|
||||
rv = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@ protected int file_encoding(struct magic_set *, const unsigned char *, size_t,
|
||||
unichar **, size_t *, const char **, const char **, const char **);
|
||||
protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
|
||||
protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
|
||||
int, int);
|
||||
size_t, int, int);
|
||||
protected int file_apprentice(struct magic_set *, const char *, int);
|
||||
protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
|
||||
protected uint64_t file_signextend(struct magic_set *, struct magic *,
|
||||
|
||||
@@ -235,7 +235,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
|
||||
|
||||
/* try soft magic tests */
|
||||
if ((ms->flags & MAGIC_NO_CHECK_SOFT) == 0)
|
||||
if ((m = file_softmagic(ms, ubuf, nb, BINTEST,
|
||||
if ((m = file_softmagic(ms, ubuf, nb, 0, BINTEST,
|
||||
looks_text)) != 0) {
|
||||
if ((ms->flags & MAGIC_DEBUG) != 0)
|
||||
(void)fprintf(stderr, "softmagic %d\n", m);
|
||||
|
||||
@@ -74,13 +74,13 @@ private void cvt_64(union VALUETYPE *, const struct magic *);
|
||||
/*ARGSUSED1*/ /* nbytes passed for regularity, maybe need later */
|
||||
protected int
|
||||
file_softmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes,
|
||||
int mode, int text)
|
||||
size_t level, int mode, int text)
|
||||
{
|
||||
struct mlist *ml;
|
||||
int rv, printed_something = 0, need_separator = 0;
|
||||
for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
|
||||
if ((rv = match(ms, ml->magic, ml->nmagic, buf, nbytes, 0, mode,
|
||||
text, 0, 0, &printed_something, &need_separator,
|
||||
text, 0, level, &printed_something, &need_separator,
|
||||
NULL)) != 0)
|
||||
return rv;
|
||||
|
||||
@@ -1680,6 +1680,8 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
break;
|
||||
|
||||
case FILE_INDIRECT:
|
||||
if (offset == 0)
|
||||
return 0;
|
||||
if (nbytes < offset)
|
||||
return 0;
|
||||
sbuf = ms->o.buf;
|
||||
@@ -1687,7 +1689,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
ms->o.buf = NULL;
|
||||
ms->offset = 0;
|
||||
rv = file_softmagic(ms, s + offset, nbytes - offset,
|
||||
BINTEST, text);
|
||||
recursion_level, BINTEST, text);
|
||||
if ((ms->flags & MAGIC_DEBUG) != 0)
|
||||
fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
|
||||
rbuf = ms->o.buf;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
Bug #66731: file: infinite recursion
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!class_exists('finfo'))
|
||||
die('skip no fileinfo extension');
|
||||
--FILE--
|
||||
<?php
|
||||
$fd = __DIR__.'/cve-2014-1943.data';
|
||||
$fm = __DIR__.'/cve-2014-1943.magic';
|
||||
|
||||
$a = "\105\122\000\000\000\000\000";
|
||||
$b = str_repeat("\001", 250000);
|
||||
$m = "0 byte x\n".
|
||||
">(1.b) indirect x\n";
|
||||
|
||||
file_put_contents($fd, $a);
|
||||
$fi = finfo_open(FILEINFO_NONE);
|
||||
var_dump(finfo_file($fi, $fd));
|
||||
finfo_close($fi);
|
||||
|
||||
file_put_contents($fd, $b);
|
||||
file_put_contents($fm, $m);
|
||||
$fi = finfo_open(FILEINFO_NONE, $fm);
|
||||
var_dump(finfo_file($fi, $fd));
|
||||
finfo_close($fi);
|
||||
?>
|
||||
Done
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(__DIR__.'/cve-2014-1943.data');
|
||||
@unlink(__DIR__.'/cve-2014-1943.magic');
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%s"
|
||||
|
||||
Warning: finfo_file(): Failed identify data 0:(null) in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
@@ -4888,7 +4888,7 @@
|
||||
>>0 ubyte 0xF5 FoxPro with memo
|
||||
# http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
|
||||
#>>0 ubyte 0xFA FoxPro 2.x, with memo
|
||||
# unkown version (should not happen)
|
||||
# unknown version (should not happen)
|
||||
>>0 default x xBase
|
||||
>>>0 ubyte x (0x%x)
|
||||
# flags in version byte
|
||||
@@ -6115,7 +6115,7 @@
|
||||
>>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96
|
||||
>>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0
|
||||
>>>>>385 string GRUB\ \0 \b, GRUB version 0.97
|
||||
#unkown version
|
||||
#unknown version
|
||||
>>>343 string Geom\0Read\0\ Error\0
|
||||
>>>>321 string Loading\ stage1.5 \b, GRUB version x.y
|
||||
>>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ static PHP_FUNCTION(json_last_error);
|
||||
|
||||
static const char digits[] = "0123456789abcdef";
|
||||
|
||||
zend_class_entry *php_json_serializable_ce;
|
||||
PHP_JSON_API zend_class_entry *php_json_serializable_ce;
|
||||
|
||||
ZEND_DECLARE_MODULE_GLOBALS(json)
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ ZEND_END_MODULE_GLOBALS(json)
|
||||
|
||||
PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC);
|
||||
PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, int str_len, int options, long depth TSRMLS_DC);
|
||||
extern zend_class_entry *php_json_serializable_ce;
|
||||
extern PHP_JSON_API zend_class_entry *php_json_serializable_ce;
|
||||
|
||||
|
||||
/* json_encode() options */
|
||||
|
||||
@@ -191,7 +191,7 @@ typedef struct { /* php_oci_statement {{{ */
|
||||
sword errcode; /* last errcode*/
|
||||
OCIError *err; /* private error handle */
|
||||
OCIStmt *stmt; /* statement handle */
|
||||
char *last_query; /* last query issued. also used to determine if this is a statement or a refcursor recieved from Oracle */
|
||||
char *last_query; /* last query issued. also used to determine if this is a statement or a refcursor received from Oracle */
|
||||
long last_query_len; /* last query length */
|
||||
HashTable *columns; /* hash containing all the result columns */
|
||||
HashTable *binds; /* binds hash */
|
||||
|
||||
Regular → Executable
+9
@@ -3013,6 +3013,15 @@ static int php_openssl_is_private_key(EVP_PKEY* pkey TSRMLS_DC)
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090800fL && !defined(OPENSSL_NO_EC) && defined(EVP_PKEY_EC)
|
||||
case EVP_PKEY_EC:
|
||||
assert(pkey->pkey.ec != NULL);
|
||||
|
||||
if ( NULL == EC_KEY_get0_private_key(pkey->pkey.ec)) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "key type not supported in this PHP build!");
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #66501: EC private key support in openssl_sign
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
--FILE--
|
||||
<?php
|
||||
$pkey = 'ASN1 OID: prime256v1
|
||||
-----BEGIN EC PARAMETERS-----
|
||||
BggqhkjOPQMBBw==
|
||||
-----END EC PARAMETERS-----
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEILPkqoeyM7XgwYkuSj3077lrsrfWJK5LqMolv+m2oOjZoAoGCCqGSM49
|
||||
AwEHoUQDQgAEPq4hbIWHvB51rdWr8ejrjWo4qVNWVugYFtPg/xLQw0mHkIPZ4DvK
|
||||
sqOTOnMoezkbSmVVMuwz9flvnqHGmQvmug==
|
||||
-----END EC PRIVATE KEY-----';
|
||||
$key = openssl_pkey_get_private($pkey);
|
||||
$res = openssl_sign($data ='alpha', $sign, $key, 'ecdsa-with-SHA1');
|
||||
var_dump($res);
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
+294
-319
File diff suppressed because it is too large.
Load diff
@@ -16,7 +16,7 @@
|
||||
| Jouni Ahto <jouni.ahto@exdec.fi> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef PHP_PGSQL_H
|
||||
@@ -257,7 +257,7 @@ typedef enum _php_pgsql_data_type {
|
||||
PG_PATH,
|
||||
PG_POLYGON,
|
||||
PG_CIRCLE,
|
||||
/* unkown and system */
|
||||
/* unknown and system */
|
||||
PG_UNKNOWN
|
||||
} php_pgsql_data_type;
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, int raw,
|
||||
#endif
|
||||
|
||||
default:
|
||||
/* unkown type */
|
||||
/* unknown type */
|
||||
zval_ptr_dtor(subarray);
|
||||
*subarray = NULL;
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct myStruct {
|
||||
?>';
|
||||
var_dump( token_get_all($source));
|
||||
|
||||
// with invalid open tag for testing entire source to be unkown token
|
||||
// with invalid open tag for testing entire source to be unknown token
|
||||
echo "-- with invlalid PHP open tag & valid tokens --\n";
|
||||
$source = '<pli
|
||||
echo "hello world"; ?>';
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 4
|
||||
#define PHP_RELEASE_VERSION 26
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.4.26-dev"
|
||||
#define PHP_EXTRA_VERSION "RC1"
|
||||
#define PHP_VERSION "5.4.26RC1"
|
||||
#define PHP_VERSION_ID 50426
|
||||
Reference in new issue
Block a user