Compare commits

..
Author SHA1 Message Date
Remi Collet ba2fe0c96b Update versions for PHP 7.2.5 2018-04-24 14:55:20 +00:00
Remi Collet b14bfacb92 Update NEWS for PHP 7.2.5 2018-04-24 14:55:20 +00:00
Remi Collet 4bd28cf296 clean 2018-04-24 09:41:13 +02:00
Remi Collet ac0f7f7342 add NEWS entries 2018-04-24 09:18:41 +02:00
Stanislav Malyshev ebbef8503f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start

(cherry picked from commit 4c06d929c0)
2018-04-24 09:10:12 +02:00
Remi Collet 64513c8571 Update NEWS for 7.2.5 2018-04-11 05:35:38 +00:00
Remi Collet 81f414ef23 Update NEWS for PHP 7.2.5RC1 2018-04-11 05:19:35 +00:00
36 changed files with 1198 additions and 1384 deletions

No files matched your search

+4 -32
View File
@@ -1,33 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 May 2018, PHP 7.2.6RC1
- EXIF:
. Fixed bug #76164 (exif_read_data zend_mm_heap corrupted). (cmb)
- FPM:
. Fixed bug #76075 --with-fpm-acl wrongly tries to find libacl on FreeBSD.
(mgorny)
- intl:
. Fixed bug #74385 (Locale::parseLocale() broken with some arguments).
(Anatol)
- Opcache:
. Fixed bug #76205 (PHP-FPM sporadic crash when running Infinitewp). (Dmitry)
. Fixed bug #76275 (Assertion failure in file cache when unserializing empty
try_catch_array). (Nikita)
. Fixed bug #76281 (Opcache causes incorrect "undefined variable" errors).
(Nikita)
- Reflection:
. Fixed arginfo of array_replace(_recursive) and array_merge(_recursive).
(carusogabriel)
- Session:
. Fixed bug #74892 (Url Rewriting (trans_sid) not working on urls that start
with "#"). (Andrew Nester)
26 Apr 2018, PHP 7.2.5
- Core:
@@ -38,7 +10,7 @@ PHP NEWS
. Fixed bug #76131 (mismatch arginfo for date_create). (carusogabriel)
- Exif:
. Fixed bug #76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value).
. Fixed bug#76130 (Heap Buffer Overflow (READ: 1786) in exif_iif_add_value).
(Stas)
- FPM:
@@ -50,13 +22,13 @@ PHP NEWS
. Fixed bug #52070 (imagedashedline() - dashed line sometimes is not visible).
(cmb)
- intl:
. Fixed bug #76153 (Intl compilation fails with icu4c 61.1). (Anatol)
- iconv:
. Fixed bug #76249 (stream filter convert.iconv leads to infinite loop on
invalid sequence). (Stas)
- intl:
. Fixed bug #76153 (Intl compilation fails with icu4c 61.1). (Anatol)
- ldap:
. Fixed bug #76248 (Malicious LDAP-Server Response causes Crash). (Stas)
-1
View File
@@ -2871,7 +2871,6 @@ ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {
key = zend_string_alloc(class_name_length, 0);
zend_str_tolower_copy(ZSTR_VAL(key), class_name, class_name_length);
disabled_class = zend_hash_find_ptr(CG(class_table), key);
zend_string_release(key);
if (!disabled_class) {
return FAILURE;
}
+2 -2
View File
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=6
PHP_EXTRA_VERSION="RC1"
PHP_RELEASE_VERSION=5
PHP_EXTRA_VERSION=""
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`
+1045 -1049
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -719,7 +719,7 @@ PHP_FUNCTION(enchant_dict_quick_check)
}
if (sugg) {
zval_ptr_dtor(sugg);
zval_dtor(sugg);
array_init(sugg);
}
+2
View File
@@ -4457,11 +4457,13 @@ PHP_FUNCTION(exif_read_data)
#ifdef EXIF_DEBUG
sections_str = exif_get_sectionlist(sections_needed);
if (!sections_str) {
zend_string_release(z_sections_needed);
RETURN_FALSE;
}
exif_error_docref(NULL EXIFERR_CC, &ImageInfo, E_NOTICE, "Sections needed: %s", sections_str[0] ? sections_str : "None");
EFREE_IF(sections_str);
#endif
zend_string_release(z_sections_needed);
}
if (Z_TYPE_P(stream) == IS_RESOURCE) {
-16
View File
@@ -1,16 +0,0 @@
--TEST--
Bug #76164 (exif_read_data zend_mm_heap corrupted)
--SKIPIF--
<?php
if (!extension_loaded('exif')) die('skip exif extension not available');
?>
--FILE--
<?php
$var1 = 'nonexistentfile';
$var2 = 2200000000;
@exif_read_data($var1, $var2); // we're not interested in the warning, here
$var2 = 1;
?>
===DONE===
--EXPECT--
===DONE===
+2 -4
View File
@@ -7,14 +7,12 @@ Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequen
$fh = fopen('php://memory', 'rw');
fwrite($fh, "abc");
rewind($fh);
if (false === @stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, [])) {
stream_filter_append($fh, 'convert.iconv.ucs-2/utf-8//IGNORE', STREAM_FILTER_READ, []);
}
stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, []);
$a = stream_get_contents($fh);
var_dump(strlen($a));
?>
DONE
--EXPECTF--
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf%A8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d
int(3)
DONE
-1
View File
@@ -1082,7 +1082,6 @@ PHP_RSHUTDOWN_FUNCTION(imap)
}
}
mail_free_errorlist(&IMAPG(imap_errorstack));
IMAPG(imap_errorstack) = NIL;
}
if (IMAPG(imap_alertstack) != NIL) {
@@ -79,7 +79,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
if (U_FAILURE(status)) {
intl_error_set(NULL, status, "rbbi_create_instance: unable to "
"create instance from compiled rules", 0);
delete rbbi;
return;
}
#else
+5 -9
View File
@@ -103,23 +103,19 @@ typedef struct _intl_data {
RETVAL_NEW_STR(u8str); \
}
#define INTL_MAX_LOCALE_LEN (ULOC_FULLNAME_CAPACITY-1)
#define INTL_MAX_LOCALE_LEN 80
#define INTL_CHECK_LOCALE_LEN(locale_len) \
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
char *_msg; \
spprintf(&_msg, 0, "Locale string too long, should be no longer than %d characters", INTL_MAX_LOCALE_LEN); \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, _msg, 1); \
efree(_msg); \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
"Locale string too long, should be no longer than 80 characters", 0 ); \
RETURN_NULL(); \
}
#define INTL_CHECK_LOCALE_LEN_OR_FAILURE(locale_len) \
if((locale_len) > INTL_MAX_LOCALE_LEN) { \
char *_msg; \
spprintf(&_msg, 0, "Locale string too long, should be no longer than %d characters", INTL_MAX_LOCALE_LEN); \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, _msg, 1); \
efree(_msg); \
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, \
"Locale string too long, should be no longer than 80 characters", 0 ); \
return FAILURE; \
}
+2 -2
View File
@@ -22,7 +22,7 @@ function ut_main()
'',
'root',
'uk@currency=EURO',
'12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
'1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
);
foreach( $locales as $locale )
@@ -79,4 +79,4 @@ Locale: 'uk@currency=EURO'
ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Error creating collator with '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than %d characters: U_ILLEGAL_ARGUMENT_ERROR
Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
+2 -2
View File
@@ -23,7 +23,7 @@ function ut_main()
'',
'root',
'uk@currency=EURO',
'12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
'1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
);
foreach( $locales as $locale )
@@ -80,4 +80,4 @@ Locale: 'uk@currency=EURO'
ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Error creating collator with '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than %d characters: U_ILLEGAL_ARGUMENT_ERROR
Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
+2 -2
View File
@@ -23,7 +23,7 @@ function ut_main()
'',
'root',
'uk@currency=EURO',
'12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
'1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
);
foreach( $locales as $locale )
@@ -80,4 +80,4 @@ Locale: 'uk@currency=EURO'
ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Error creating collator with '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than %d characters: U_ILLEGAL_ARGUMENT_ERROR
Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
+2 -2
View File
@@ -22,7 +22,7 @@ function ut_main()
'',
'root',
'uk@currency=EURO',
'12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
'1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
);
foreach( $locales as $locale )
@@ -76,4 +76,4 @@ Locale: 'uk@currency=EURO'
ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
ULOC_VALID_LOCALE = 'uk'
ULOC_ACTUAL_LOCALE = 'uk'
Error creating collator with '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than %d characters: U_ILLEGAL_ARGUMENT_ERROR
Error creating collator with '1234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than 80 characters: U_ILLEGAL_ARGUMENT_ERROR
+1 -10
View File
@@ -24,17 +24,8 @@ $rules = <<<RULES
RULES;
$rbbi = new IntlRuleBasedBreakIterator($rules);
var_dump(get_class($rbbi));
try {
$obj = new IntlRuleBasedBreakIterator('[\p{Letter}\uFFFD]+;[:number:]+', 'aoeu');
} catch (IntlException $e) {
var_dump(intl_get_error_code(), intl_get_error_message());
}
?>
==DONE==
--EXPECT--
string(26) "IntlRuleBasedBreakIterator"
int(1)
string(93) "rbbi_create_instance: unable to create instance from compiled rules: U_ILLEGAL_ARGUMENT_ERROR"
==DONE==
==DONE==
-5
View File
@@ -1020,11 +1020,6 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array)
}
if (i != j) {
op_array->last_try_catch = j;
if (j == 0) {
efree(op_array->try_catch_array);
op_array->try_catch_array = NULL;
}
if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
zend_op *opline = new_opcodes;
zend_op *end = opline + len;
+3 -4
View File
@@ -171,13 +171,12 @@ static void zend_ssa_remove_nops(zend_op_array *op_array, zend_ssa *ssa)
while (i < end) {
shiftlist[i] = i - target;
if (EXPECTED(op_array->opcodes[i].opcode != ZEND_NOP) ||
/* Keep NOP to support ZEND_VM_SMART_BRANCH. Using "target-1" instead of
* "i-1" here to check the last non-NOP instruction. */
(target > 0 &&
/*keep NOP to support ZEND_VM_SMART_BRANCH */
(i > 0 &&
i + 1 < op_array->last &&
(op_array->opcodes[i+1].opcode == ZEND_JMPZ ||
op_array->opcodes[i+1].opcode == ZEND_JMPNZ) &&
zend_is_smart_branch(op_array->opcodes + target - 1))) {
zend_is_smart_branch(op_array->opcodes + i - 1))) {
if (i != target) {
op_array->opcodes[target] = op_array->opcodes[i];
ssa->ops[target] = ssa->ops[i];
-29
View File
@@ -1,29 +0,0 @@
--TEST--
Bug #76275: Assertion failure in file cache when unserializing empty try_catch_array
--INI--
opcache.enabled=1
opcache.enable_cli=1
opcache.file_cache=/tmp
--FILE--
<?php
if (PHP_VERSION_ID >= 70000) {
echo "Done";
return;
}
if (!is_callable('random_bytes')) {
try {
} catch (com_exception $e) {
}
function random_bytes($length)
{
throw new Exception(
'There is no suitable CSPRNG installed on your system'
);
return '';
}
}
--EXPECT--
Done
-28
View File
@@ -1,28 +0,0 @@
--TEST--
Bug #76281: Opcache causes incorrect "undefined variable" errors
--FILE--
<?php
function test($r, $action) {
$user_sub_resource = in_array($action, array('get_securityquestions', 'get_status', 'get_groupstats'));
$user_id = null;
if ($user_sub_resource && isset($r['user_id'])) {
$user_id = $r['user_id'];
}
else if (isset($r['id'])) {
$user_id = $r['id'];
}
if ($user_sub_resource) {
return 'foo';
}
return 'bar';
}
var_dump(test(['user_id' => 1, 'id' => 2], 'foo'));
?>
--EXPECT--
string(3) "bar"
+23 -29
View File
@@ -96,10 +96,8 @@ static int zend_file_cache_flock(int fd, int type)
#define IS_SERIALIZED_INTERNED(ptr) \
((size_t)(ptr) & Z_UL(1))
/* Allowing == here to account for a potential empty allocation at the end of the memory */
#define IS_SERIALIZED(ptr) \
((char*)(ptr) <= (char*)script->size)
((char*)(ptr) < (char*)script->size)
#define IS_UNSERIALIZED(ptr) \
(((char*)(ptr) >= (char*)script->mem && (char*)(ptr) < (char*)script->mem + script->size) || \
IS_ACCEL_INTERNED(ptr))
@@ -535,13 +533,14 @@ static void zend_file_cache_serialize_prop_info(zval *zv,
prop = Z_PTR_P(zv);
UNSERIALIZE_PTR(prop);
ZEND_ASSERT(prop->ce != NULL && prop->name != NULL);
if (!IS_SERIALIZED(prop->ce)) {
if (prop->ce && !IS_SERIALIZED(prop->ce)) {
SERIALIZE_PTR(prop->ce);
}
if (prop->name && !IS_SERIALIZED(prop->name)) {
SERIALIZE_STR(prop->name);
if (prop->doc_comment) {
SERIALIZE_STR(prop->doc_comment);
}
}
if (prop->doc_comment && !IS_SERIALIZED(prop->doc_comment)) {
SERIALIZE_STR(prop->doc_comment);
}
}
}
@@ -558,15 +557,12 @@ static void zend_file_cache_serialize_class_constant(zval *z
c = Z_PTR_P(zv);
UNSERIALIZE_PTR(c);
ZEND_ASSERT(c->ce != NULL);
if (!IS_SERIALIZED(c->ce)) {
zend_file_cache_serialize_zval(&c->value, script, info, buf);
if (c->ce && !IS_SERIALIZED(c->ce)) {
SERIALIZE_PTR(c->ce);
zend_file_cache_serialize_zval(&c->value, script, info, buf);
if (c->doc_comment) {
SERIALIZE_STR(c->doc_comment);
}
}
if (c->doc_comment && !IS_SERIALIZED(c->doc_comment)) {
SERIALIZE_STR(c->doc_comment);
}
}
}
@@ -1161,13 +1157,14 @@ static void zend_file_cache_unserialize_prop_info(zval *zv,
UNSERIALIZE_PTR(Z_PTR_P(zv));
prop = Z_PTR_P(zv);
ZEND_ASSERT(prop->ce != NULL && prop->name != NULL);
if (!IS_UNSERIALIZED(prop->ce)) {
if (prop->ce && !IS_UNSERIALIZED(prop->ce)) {
UNSERIALIZE_PTR(prop->ce);
}
if (prop->name && !IS_UNSERIALIZED(prop->name)) {
UNSERIALIZE_STR(prop->name);
if (prop->doc_comment) {
UNSERIALIZE_STR(prop->doc_comment);
}
}
if (prop->doc_comment && !IS_UNSERIALIZED(prop->doc_comment)) {
UNSERIALIZE_STR(prop->doc_comment);
}
}
}
@@ -1182,15 +1179,12 @@ static void zend_file_cache_unserialize_class_constant(zval *
UNSERIALIZE_PTR(Z_PTR_P(zv));
c = Z_PTR_P(zv);
ZEND_ASSERT(c->ce != NULL);
if (!IS_UNSERIALIZED(c->ce)) {
zend_file_cache_unserialize_zval(&c->value, script, buf);
if (c->ce && !IS_UNSERIALIZED(c->ce)) {
UNSERIALIZE_PTR(c->ce);
zend_file_cache_unserialize_zval(&c->value, script, buf);
if (c->doc_comment) {
UNSERIALIZE_STR(c->doc_comment);
}
}
if (c->doc_comment && !IS_UNSERIALIZED(c->doc_comment)) {
UNSERIALIZE_STR(c->doc_comment);
}
}
}
@@ -79,9 +79,6 @@ while (($enc_error_new = openssl_error_string()) !== false) {
var_dump($error_queue_size);
echo "\n";
$is_111 = OPENSSL_VERSION_NUMBER >= 0x10101000;
$err_pem_no_start_line = $is_111 ? '0909006C': '0906D06C';
// PKEY
echo "PKEY errors\n";
// file for pkey (file:///) fails when opennig (BIO_new_file)
@@ -89,7 +86,7 @@ echo "PKEY errors\n";
expect_openssl_errors('openssl_pkey_export_to_file opening', ['02001002', '2006D080']);
// file or private pkey is not correct PEM - failing PEM_read_bio_PrivateKey
@openssl_pkey_export_to_file($csr_file, $output_file);
expect_openssl_errors('openssl_pkey_export_to_file pem', [$err_pem_no_start_line]);
expect_openssl_errors('openssl_pkey_export_to_file pem', ['0906D06C']);
// file to export cannot be written
@openssl_pkey_export_to_file($private_key_file, $invalid_file_for_write);
expect_openssl_errors('openssl_pkey_export_to_file write', ['2006D002']);
@@ -98,7 +95,7 @@ expect_openssl_errors('openssl_pkey_export_to_file write', ['2006D002']);
expect_openssl_errors('openssl_pkey_export', ['06065064', '0906A065']);
// invalid x509 for getting public key
@openssl_pkey_get_public($private_key_file);
expect_openssl_errors('openssl_pkey_get_public', [$err_pem_no_start_line]);
expect_openssl_errors('openssl_pkey_get_public', ['0906D06C']);
// private encrypt with unknown padding
@openssl_private_encrypt("data", $crypted, $private_key_file, 1000);
expect_openssl_errors('openssl_private_encrypt', ['04066076']);
@@ -108,7 +105,7 @@ expect_openssl_errors('openssl_private_decrypt', ['04065072']);
// public encrypt and decrypt with failed padding check and padding
@openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
@openssl_public_decrypt("data", $crypted, $public_key_file);
expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '04068076', '04067072']);
expect_openssl_errors('openssl_private_(en|de)crypt padding', ['0906D06C', '04068076', '04067072']);
// X509
echo "X509 errors\n";
@@ -117,7 +114,7 @@ echo "X509 errors\n";
expect_openssl_errors('openssl_x509_export_to_file open', ['02001002']);
// file or str cert is not correct PEM - failing PEM_read_bio_X509 or PEM_ASN1_read_bio
@openssl_x509_export_to_file($csr_file, $output_file);
expect_openssl_errors('openssl_x509_export_to_file pem', [$err_pem_no_start_line]);
expect_openssl_errors('openssl_x509_export_to_file pem', ['0906D06C']);
// file to export cannot be written
@openssl_x509_export_to_file($crt_file, $invalid_file_for_write);
expect_openssl_errors('openssl_x509_export_to_file write', ['2006D002']);
@@ -132,7 +129,7 @@ echo "CSR errors\n";
expect_openssl_errors('openssl_csr_get_subject open', ['02001002', '2006D080']);
// file or str csr is not correct PEM - failing PEM_read_bio_X509_REQ
@openssl_csr_get_subject($crt_file);
expect_openssl_errors('openssl_csr_get_subjec pem', [$err_pem_no_start_line]);
expect_openssl_errors('openssl_csr_get_subjec pem', ['0906D06C']);
// other possible cuases that are difficult to catch:
// - ASN1_STRING_to_UTF8 fails in add_assoc_name_entry
+1 -1
View File
@@ -1835,7 +1835,7 @@ static int phar_check_str(const char *fname, const char *ext_str, int ext_len, i
char test[51];
const char *pos;
if (ext_len < 0 || ext_len >= 50) {
if (ext_len >= 50) {
return FAILURE;
}
+7 -8
View File
@@ -1,11 +1,10 @@
#!/usr/bin/env bash
if [[ "$2" = "" ]] || [[ "$3" = "" ]]; then
echo "Usage: $0 BASE_DIRECTORY DEPTH BITS_PER_CHAR"
echo "Usage: $0 BASE_DIRECTORY DEPTH HASH_BITS"
echo "BASE_DIRECTORY will be created if it doesn't exist"
echo "DEPTH must be an integer number >0"
echo "BITS_PER_CHAR(session.sid_bits_per_character) should be one of 4, 5, or 6."
# http://php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character
echo "HASH_BITS(session.hash_bits_per_character) should be one of 4, 5, or 6"
exit 1
fi
@@ -19,15 +18,15 @@ fi
directory="$1"
depth="$2"
bitsperchar="$3"
hashbits="$3"
hash_chars="0 1 2 3 4 5 6 7 8 9 a b c d e f"
if [[ "$bitsperchar" -ge "5" ]]; then
if [[ "$hashbits" -ge "5" ]]; then
hash_chars="$hash_chars g h i j k l m n o p q r s t u v"
fi
if [[ "$bitsperchar" -ge "6" ]]; then
if [[ "$hashbits" -ge "6" ]]; then
hash_chars="$hash_chars w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - ,"
fi
@@ -57,10 +56,10 @@ if [[ ! -d $directory ]]; then
fi
echo "Creating session path in $directory with a depth of $depth for session.sid_bits_per_character = $bitsperchar"
echo "Creating session path in $directory with a depth of $depth for session.hash_bits_per_character = $hashbits"
for i in $hash_chars; do
newpath="$directory/$i"
mkdir $newpath || exit 1
bash $0 $newpath `expr $depth - 1` $bitsperchar recurse
bash $0 $newpath `expr $depth - 1` $hashbits recurse
done
-23
View File
@@ -1,23 +0,0 @@
--TEST--
Bug #74892 Url Rewriting (trans_sid) not working on urls that start with #
--FILE--
<?php
ini_set('session.use_cookies', '0');
ini_set('session.use_only_cookies',0);
ini_set('session.use_trans_sid',1);
ini_set('session.trans_sid_hosts','php.net');
session_id('sessionidhere');
session_start();
?>
<p><a href="index.php">Click This Anchor Tag!</a></p>
<p><a href="index.php#place">External link with anchor</a></p>
<p><a href="http://php.net#foo">External link with anchor 2</a></p>
<p><a href="#place">Internal link</a></p>
===DONE===
--EXPECT--
<p><a href="index.php?PHPSESSID=sessionidhere">Click This Anchor Tag!</a></p>
<p><a href="index.php?PHPSESSID=sessionidhere#place">External link with anchor</a></p>
<p><a href="http://php.net?PHPSESSID=sessionidhere#foo">External link with anchor 2</a></p>
<p><a href="#place">Internal link</a></p>
===DONE===
+21 -21
View File
@@ -1299,11 +1299,11 @@ PHP_FUNCTION(socket_getsockname)
case AF_INET6:
sin6 = (struct sockaddr_in6 *) sa;
inet_ntop(AF_INET6, &sin6->sin6_addr, addr6, INET6_ADDRSTRLEN);
zval_ptr_dtor(addr);
zval_dtor(addr);
ZVAL_STRING(addr, addr6);
if (port != NULL) {
zval_ptr_dtor(port);
zval_dtor(port);
ZVAL_LONG(port, htons(sin6->sin6_port));
}
RETURN_TRUE;
@@ -1316,11 +1316,11 @@ PHP_FUNCTION(socket_getsockname)
addr_string = inet_ntoa(sin->sin_addr);
inet_ntoa_lock = 0;
zval_ptr_dtor(addr);
zval_dtor(addr);
ZVAL_STRING(addr, addr_string);
if (port != NULL) {
zval_ptr_dtor(port);
zval_dtor(port);
ZVAL_LONG(port, htons(sin->sin_port));
}
RETURN_TRUE;
@@ -1329,7 +1329,7 @@ PHP_FUNCTION(socket_getsockname)
case AF_UNIX:
s_un = (struct sockaddr_un *) sa;
zval_ptr_dtor(addr);
zval_dtor(addr);
ZVAL_STRING(addr, s_un->sun_path);
RETURN_TRUE;
break;
@@ -1378,11 +1378,11 @@ PHP_FUNCTION(socket_getpeername)
case AF_INET6:
sin6 = (struct sockaddr_in6 *) sa;
inet_ntop(AF_INET6, &sin6->sin6_addr, addr6, INET6_ADDRSTRLEN);
zval_ptr_dtor(arg2);
zval_dtor(arg2);
ZVAL_STRING(arg2, addr6);
if (arg3 != NULL) {
zval_ptr_dtor(arg3);
zval_dtor(arg3);
ZVAL_LONG(arg3, htons(sin6->sin6_port));
}
@@ -1396,11 +1396,11 @@ PHP_FUNCTION(socket_getpeername)
addr_string = inet_ntoa(sin->sin_addr);
inet_ntoa_lock = 0;
zval_ptr_dtor(arg2);
zval_dtor(arg2);
ZVAL_STRING(arg2, addr_string);
if (arg3 != NULL) {
zval_ptr_dtor(arg3);
zval_dtor(arg3);
ZVAL_LONG(arg3, htons(sin->sin_port));
}
@@ -1410,7 +1410,7 @@ PHP_FUNCTION(socket_getpeername)
case AF_UNIX:
s_un = (struct sockaddr_un *) sa;
zval_ptr_dtor(arg2);
zval_dtor(arg2);
ZVAL_STRING(arg2, s_un->sun_path);
RETURN_TRUE;
break;
@@ -1683,14 +1683,14 @@ PHP_FUNCTION(socket_recv)
if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
zend_string_free(recv_buf);
zval_ptr_dtor(buf);
zval_dtor(buf);
ZVAL_NULL(buf);
} else {
ZSTR_LEN(recv_buf) = retval;
ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
/* Rebuild buffer zval */
zval_ptr_dtor(buf);
zval_dtor(buf);
ZVAL_NEW_STR(buf, recv_buf);
}
@@ -1779,8 +1779,8 @@ PHP_FUNCTION(socket_recvfrom)
ZSTR_LEN(recv_buf) = retval;
ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
zval_ptr_dtor(arg2);
zval_ptr_dtor(arg5);
zval_dtor(arg2);
zval_dtor(arg5);
ZVAL_NEW_STR(arg2, recv_buf);
ZVAL_STRING(arg5, s_un.sun_path);
@@ -1806,9 +1806,9 @@ PHP_FUNCTION(socket_recvfrom)
ZSTR_LEN(recv_buf) = retval;
ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
zval_ptr_dtor(arg2);
zval_ptr_dtor(arg5);
zval_ptr_dtor(arg6);
zval_dtor(arg2);
zval_dtor(arg5);
zval_dtor(arg6);
address = inet_ntoa(sin.sin_addr);
@@ -1837,9 +1837,9 @@ PHP_FUNCTION(socket_recvfrom)
ZSTR_LEN(recv_buf) = retval;
ZSTR_VAL(recv_buf)[ZSTR_LEN(recv_buf)] = '\0';
zval_ptr_dtor(arg2);
zval_ptr_dtor(arg5);
zval_ptr_dtor(arg6);
zval_dtor(arg2);
zval_dtor(arg5);
zval_dtor(arg6);
memset(addr6, 0, INET6_ADDRSTRLEN);
inet_ntop(AF_INET6, &sin6.sin6_addr, addr6, INET6_ADDRSTRLEN);
@@ -2232,7 +2232,7 @@ PHP_FUNCTION(socket_create_pair)
RETURN_FALSE;
}
zval_ptr_dtor(fds_array_zval);
zval_dtor(fds_array_zval);
array_init(fds_array_zval);
php_sock[0]->bsd_socket = fds_array[0];
@@ -11,9 +11,6 @@ die('skip not for Microsoft Windows');
if (strtolower(substr(PHP_OS, 0, 3)) == 'aix') {
die('skip not for AIX');
}
if (!defined('SO_PASSCRED')) {
die('skip SO_PASSCRED is not defined');
}
--CLEAN--
<?php
$path = __DIR__ . "/unix_sock";
+5 -5
View File
@@ -3897,7 +3897,7 @@ static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETE
}
/* }}} */
/* {{{ proto array array_merge(array arr1 [, array ...])
/* {{{ proto array array_merge(array arr1, array arr2 [, array ...])
Merges elements from passed arrays into one array */
PHP_FUNCTION(array_merge)
{
@@ -3905,7 +3905,7 @@ PHP_FUNCTION(array_merge)
}
/* }}} */
/* {{{ proto array array_merge_recursive(array arr1 [, array ...])
/* {{{ proto array array_merge_recursive(array arr1, array arr2 [, array ...])
Recursively merges elements from passed arrays into one array */
PHP_FUNCTION(array_merge_recursive)
{
@@ -3913,7 +3913,7 @@ PHP_FUNCTION(array_merge_recursive)
}
/* }}} */
/* {{{ proto array array_replace(array arr1 [, array ...])
/* {{{ proto array array_replace(array arr1, array arr2 [, array ...])
Replaces elements from passed arrays into one array */
PHP_FUNCTION(array_replace)
{
@@ -3921,7 +3921,7 @@ PHP_FUNCTION(array_replace)
}
/* }}} */
/* {{{ proto array array_replace_recursive(array arr1 [, array ...])
/* {{{ proto array array_replace_recursive(array arr1, array arr2 [, array ...])
Recursively replaces elements from passed arrays into one array */
PHP_FUNCTION(array_replace_recursive)
{
@@ -4829,7 +4829,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
ZVAL_UNDEF(&list->val);
if (hash->nNumOfElements > 1) {
if (behavior == INTERSECT_NORMAL) {
zend_sort((void *) lists[i], hash->nNumOfElements,
zend_sort((void *) lists[i], hash->nNumOfElements,
sizeof(Bucket), intersect_data_compare_func, (swap_func_t)zend_hash_bucket_swap);
} else if (behavior & INTERSECT_ASSOC) { /* triggered also when INTERSECT_KEY */
zend_sort((void *) lists[i], hash->nNumOfElements,
+5 -5
View File
@@ -391,22 +391,22 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_array_slice, 0, 0, 2)
ZEND_ARG_INFO(0, preserve_keys)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge, 0, 0, 2)
ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_VARIADIC_INFO(0, arrays)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_merge_recursive, 0, 0, 2)
ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_VARIADIC_INFO(0, arrays)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace, 0, 0, 2)
ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_VARIADIC_INFO(0, arrays)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace_recursive, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_array_replace_recursive, 0, 0, 2)
ZEND_ARG_INFO(0, arr1) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_VARIADIC_INFO(0, arrays)
ZEND_END_ARG_INFO()
@@ -4040,7 +4040,7 @@ PHP_FUNCTION(long2ip)
********************/
/* {{{ proto string getenv(string varname[, bool local_only]
Get the value of an environment variable or every available environment variable
Get the value of an environment variable or every available environment variable
if no varname is present */
PHP_FUNCTION(getenv)
{
+46 -52
View File
@@ -194,13 +194,6 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
return;
}
/* Don't modify URLs of the format "#mark" */
if (url_parts->fragment && '#' == ZSTR_VAL(url->s)[0]) {
smart_str_append_smart_str(dest, url);
php_url_free(url_parts);
return;
}
/* Check protocol. Only http/https is allowed. */
if (url_parts->scheme
&& strcasecmp("http", url_parts->scheme)
@@ -224,12 +217,13 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
* When URL does not have path and query string add "/?".
* i.e. If URL is only "?foo=bar", should not add "/?".
*/
if (!url_parts->path && !url_parts->query && !url_parts->fragment) {
if (!url_parts->path && !url_parts->query) {
/* URL is http://php.net or like */
smart_str_append_smart_str(dest, url);
smart_str_appendc(dest, '/');
smart_str_appendc(dest, '?');
smart_str_append_smart_str(dest, url_app);
/* There should not be fragment. Just return */
php_url_free(url_parts);
return;
}
@@ -519,7 +513,7 @@ state_plain_begin:
state_plain:
start = YYCURSOR;
#line 523 "ext/standard/url_scanner_ex.c"
#line 517 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -569,22 +563,22 @@ yy2:
if (yybm[0+yych] & 128) {
goto yy2;
}
#line 526 "ext/standard/url_scanner_ex.re"
#line 520 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); goto state_plain; }
#line 575 "ext/standard/url_scanner_ex.c"
#line 569 "ext/standard/url_scanner_ex.c"
yy5:
++YYCURSOR;
#line 525 "ext/standard/url_scanner_ex.re"
#line 519 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
#line 580 "ext/standard/url_scanner_ex.c"
#line 574 "ext/standard/url_scanner_ex.c"
}
#line 527 "ext/standard/url_scanner_ex.re"
#line 521 "ext/standard/url_scanner_ex.re"
state_tag:
start = YYCURSOR;
#line 588 "ext/standard/url_scanner_ex.c"
#line 582 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -627,9 +621,9 @@ state_tag:
goto yy11;
}
++YYCURSOR;
#line 533 "ext/standard/url_scanner_ex.re"
#line 527 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); goto state_plain_begin; }
#line 633 "ext/standard/url_scanner_ex.c"
#line 627 "ext/standard/url_scanner_ex.c"
yy11:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -637,11 +631,11 @@ yy11:
if (yybm[0+yych] & 128) {
goto yy11;
}
#line 532 "ext/standard/url_scanner_ex.re"
#line 526 "ext/standard/url_scanner_ex.re"
{ handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; }
#line 643 "ext/standard/url_scanner_ex.c"
#line 637 "ext/standard/url_scanner_ex.c"
}
#line 534 "ext/standard/url_scanner_ex.re"
#line 528 "ext/standard/url_scanner_ex.re"
state_next_arg_begin:
@@ -650,7 +644,7 @@ state_next_arg_begin:
state_next_arg:
start = YYCURSOR;
#line 654 "ext/standard/url_scanner_ex.c"
#line 648 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -706,9 +700,9 @@ state_next_arg:
yy16:
++YYCURSOR;
yy17:
#line 545 "ext/standard/url_scanner_ex.re"
#line 539 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); goto state_plain_begin; }
#line 712 "ext/standard/url_scanner_ex.c"
#line 706 "ext/standard/url_scanner_ex.c"
yy18:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -716,30 +710,30 @@ yy18:
if (yybm[0+yych] & 128) {
goto yy18;
}
#line 543 "ext/standard/url_scanner_ex.re"
#line 537 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); goto state_next_arg; }
#line 722 "ext/standard/url_scanner_ex.c"
#line 716 "ext/standard/url_scanner_ex.c"
yy21:
yych = *++YYCURSOR;
if (yych != '>') goto yy17;
yy22:
++YYCURSOR;
#line 542 "ext/standard/url_scanner_ex.re"
#line 536 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; }
#line 730 "ext/standard/url_scanner_ex.c"
#line 724 "ext/standard/url_scanner_ex.c"
yy24:
++YYCURSOR;
#line 544 "ext/standard/url_scanner_ex.re"
#line 538 "ext/standard/url_scanner_ex.re"
{ --YYCURSOR; STATE = STATE_ARG; goto state_arg; }
#line 735 "ext/standard/url_scanner_ex.c"
#line 729 "ext/standard/url_scanner_ex.c"
}
#line 546 "ext/standard/url_scanner_ex.re"
#line 540 "ext/standard/url_scanner_ex.re"
state_arg:
start = YYCURSOR;
#line 743 "ext/standard/url_scanner_ex.c"
#line 737 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -784,9 +778,9 @@ state_arg:
if (yych <= 'z') goto yy30;
yy28:
++YYCURSOR;
#line 552 "ext/standard/url_scanner_ex.re"
#line 546 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; }
#line 790 "ext/standard/url_scanner_ex.c"
#line 784 "ext/standard/url_scanner_ex.c"
yy30:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -794,17 +788,17 @@ yy30:
if (yybm[0+yych] & 128) {
goto yy30;
}
#line 551 "ext/standard/url_scanner_ex.re"
#line 545 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; }
#line 800 "ext/standard/url_scanner_ex.c"
#line 794 "ext/standard/url_scanner_ex.c"
}
#line 553 "ext/standard/url_scanner_ex.re"
#line 547 "ext/standard/url_scanner_ex.re"
state_before_val:
start = YYCURSOR;
#line 808 "ext/standard/url_scanner_ex.c"
#line 802 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -847,9 +841,9 @@ state_before_val:
if (yych == '=') goto yy38;
++YYCURSOR;
yy36:
#line 559 "ext/standard/url_scanner_ex.re"
#line 553 "ext/standard/url_scanner_ex.re"
{ --YYCURSOR; goto state_next_arg_begin; }
#line 853 "ext/standard/url_scanner_ex.c"
#line 847 "ext/standard/url_scanner_ex.c"
yy37:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ' ') goto yy41;
@@ -861,9 +855,9 @@ yy38:
if (yybm[0+yych] & 128) {
goto yy38;
}
#line 558 "ext/standard/url_scanner_ex.re"
#line 552 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; }
#line 867 "ext/standard/url_scanner_ex.c"
#line 861 "ext/standard/url_scanner_ex.c"
yy41:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -873,14 +867,14 @@ yy41:
YYCURSOR = YYMARKER;
goto yy36;
}
#line 560 "ext/standard/url_scanner_ex.re"
#line 554 "ext/standard/url_scanner_ex.re"
state_val:
start = YYCURSOR;
#line 884 "ext/standard/url_scanner_ex.c"
#line 878 "ext/standard/url_scanner_ex.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
@@ -933,15 +927,15 @@ yy46:
if (yybm[0+yych] & 32) {
goto yy46;
}
#line 568 "ext/standard/url_scanner_ex.re"
#line 562 "ext/standard/url_scanner_ex.re"
{ handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; }
#line 939 "ext/standard/url_scanner_ex.c"
#line 933 "ext/standard/url_scanner_ex.c"
yy49:
++YYCURSOR;
yy50:
#line 569 "ext/standard/url_scanner_ex.re"
#line 563 "ext/standard/url_scanner_ex.re"
{ passthru(STD_ARGS); goto state_next_arg_begin; }
#line 945 "ext/standard/url_scanner_ex.c"
#line 939 "ext/standard/url_scanner_ex.c"
yy51:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == '>') goto yy50;
@@ -964,9 +958,9 @@ yy55:
goto yy50;
yy56:
++YYCURSOR;
#line 566 "ext/standard/url_scanner_ex.re"
#line 560 "ext/standard/url_scanner_ex.re"
{ handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; }
#line 970 "ext/standard/url_scanner_ex.c"
#line 964 "ext/standard/url_scanner_ex.c"
yy58:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -977,11 +971,11 @@ yy59:
}
if (yych >= '(') goto yy55;
++YYCURSOR;
#line 567 "ext/standard/url_scanner_ex.re"
#line 561 "ext/standard/url_scanner_ex.re"
{ handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; }
#line 983 "ext/standard/url_scanner_ex.c"
#line 977 "ext/standard/url_scanner_ex.c"
}
#line 570 "ext/standard/url_scanner_ex.re"
#line 564 "ext/standard/url_scanner_ex.re"
stop:
+2 -8
View File
@@ -197,13 +197,6 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
return;
}
/* Don't modify URLs of the format "#mark" */
if (url_parts->fragment && '#' == ZSTR_VAL(url->s)[0]) {
smart_str_append_smart_str(dest, url);
php_url_free(url_parts);
return;
}
/* Check protocol. Only http/https is allowed. */
if (url_parts->scheme
&& strcasecmp("http", url_parts->scheme)
@@ -227,12 +220,13 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
* When URL does not have path and query string add "/?".
* i.e. If URL is only "?foo=bar", should not add "/?".
*/
if (!url_parts->path && !url_parts->query && !url_parts->fragment) {
if (!url_parts->path && !url_parts->query) {
/* URL is http://php.net or like */
smart_str_append_smart_str(dest, url);
smart_str_appendc(dest, '/');
smart_str_appendc(dest, '?');
smart_str_append_smart_str(dest, url_app);
/* There should not be fragment. Just return */
php_url_free(url_parts);
return;
}
+1 -2
View File
@@ -10,8 +10,7 @@ if (PHP_ZIP != "no") {
) {
EXTENSION('zip', 'php_zip.c zip_stream.c');
if (get_define("LIBS_ZIP").match("libzip_a.lib")) {
/* Using static dependency lib. */
if (!PHP_ZIP_SHARED) {
AC_DEFINE("ZIP_STATIC", 1);
}
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 6
#define PHP_EXTRA_VERSION "RC1"
#define PHP_VERSION "7.2.6RC1"
#define PHP_VERSION_ID 70206
#define PHP_RELEASE_VERSION 5
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.2.5"
#define PHP_VERSION_ID 70205
+3 -8
View File
@@ -630,16 +630,11 @@ if test "$PHP_FPM" != "no"; then
if test "$PHP_FPM_ACL" != "no" ; then
AC_CHECK_HEADERS([sys/acl.h])
dnl *BSD has acl_* built into libc
AC_CHECK_FUNC(acl_free, [
AC_CHECK_LIB(acl, acl_free, [
PHP_ADD_LIBRARY(acl)
AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
],[
AC_CHECK_LIB(acl, acl_free, [
PHP_ADD_LIBRARY(acl)
AC_DEFINE(HAVE_FPM_ACL, 1, [ POSIX Access Control List ])
],[
AC_MSG_ERROR(libacl required not found)
])
AC_MSG_ERROR(libacl required not found)
])
fi
+1 -6
View File
@@ -1116,7 +1116,7 @@ const char phpdbg_ini_hardcoded[] =
/* overwriteable ini defaults must be set in phpdbg_ini_defaults() */
#define INI_DEFAULT(name, value) \
ZVAL_NEW_STR(&tmp, zend_string_init(value, sizeof(value) - 1, 1)); \
ZVAL_STRINGL(&tmp, value, sizeof(value) - 1); \
zend_hash_str_update(configuration_hash, name, sizeof(name) - 1, &tmp);
void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */
@@ -1805,11 +1805,6 @@ phpdbg_main:
if (php_request_startup() == FAILURE) {
PUTS("Could not startup");
#ifndef _WIN32
if (address) {
free(address);
}
#endif
return 1;
}
+1 -1
View File
@@ -1,7 +1,7 @@
bz2-1.0.6
cclient-2007f
freetype-2.8.1
icu-61.1
icu-57.1
jpeglib-9b
libcurl-7.59.0
libiconv-1.15