mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 03:00:49 +00:00
Compare commits
29
Commits
php-7.3.13
...
php-7.2.29
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc274342d2 | ||
|
|
f5377d26da | ||
|
|
bef2b07c05 | ||
|
|
c8d21d7728 | ||
|
|
2c081b7e26 | ||
|
|
0d139c5b94 | ||
|
|
41f66e2a2c | ||
|
|
63f6608f89 | ||
|
|
5009b9811d | ||
|
|
2826364298 | ||
|
|
e5c95234d8 | ||
|
|
d76f7c6c63 | ||
|
|
8308196c97 | ||
|
|
cec8b24c84 | ||
|
|
2dc170e25d | ||
|
|
7e2bd95fa5 | ||
|
|
5c90f8eb66 | ||
|
|
2bcbc95f03 | ||
|
|
0f79b1bf30 | ||
|
|
f79c774274 | ||
|
|
864f5ef12f | ||
|
|
9705e631a4 | ||
|
|
6d5cddabaf | ||
|
|
c14eb8de97 | ||
|
|
d348cfb96f | ||
|
|
eb23c60087 | ||
|
|
b771a18133 | ||
|
|
0e6c0654ed | ||
|
|
a5a15965da |
No files matched your search
@@ -1,9 +1,58 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2019, PHP 7.2.27
|
||||
19 Mar 2020, PHP 7.2.29
|
||||
|
||||
- Core:
|
||||
. Fixed bug #79329 (get_headers() silently truncates after a null byte)
|
||||
(CVE-2020-7066) (cmb)
|
||||
|
||||
19 Dec 2019, PHP 7.2.26
|
||||
- EXIF:
|
||||
. Fixed bug #79282 (Use-of-uninitialized-value in exif) (CVE-2020-7064)
|
||||
(Nikita)
|
||||
|
||||
20 Feb 2020, PHP 7.2.28
|
||||
|
||||
- DOM:
|
||||
. Fixed bug #77569: (Write Access Violation in DomImplementation). (Nikita,
|
||||
cmb)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #79082 (Files added to tar with Phar::buildFromIterator have
|
||||
all-access permissions). (CVE-2020-7063) (stas)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #79221 (Null Pointer Dereference in PHP Session Upload Progress).
|
||||
(CVE-2020-7062) (stas)
|
||||
|
||||
23 Jan 2020, PHP 7.2.27
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`).
|
||||
(CVE-2020-7060) (Nikita)
|
||||
|
||||
- Session:
|
||||
. Fixed bug #79091 (heap use-after-free in session_create_id()). (cmb, Nikita)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #79099 (OOB read in php_strip_tags_ex). (CVE-2020-7059). (cmb)
|
||||
|
||||
18 Dec 2019, PHP 7.2.26
|
||||
|
||||
- Bcmath:
|
||||
. Fixed bug #78878 (Buffer underflow in bc_shift_addsub). (CVE-2019-11046).
|
||||
(cmb)
|
||||
|
||||
- Core:
|
||||
. Fixed bug #78862 (link() silently truncates after a null byte on Windows).
|
||||
(CVE-2019-11044). (cmb)
|
||||
. Fixed bug #78863 (DirectoryIterator class silently truncates after a null
|
||||
byte). (CVE-2019-11045). (cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #78793 (Use-after-free in exif parsing under memory sanitizer).
|
||||
(CVE-2019-11050). (Nikita)
|
||||
. Fixed bug #78910 (Heap-buffer-overflow READ in exif). (CVE-2019-11047).
|
||||
(Nikita)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #78849 (GD build broken with -D SIGNED_COMPARE_SLOW). (cmb)
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=27
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_RELEASE_VERSION=29
|
||||
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`
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ bc_str2num (bc_num *num, char *str, int scale)
|
||||
zero_int = FALSE;
|
||||
if ( (*ptr == '+') || (*ptr == '-')) ptr++; /* Sign */
|
||||
while (*ptr == '0') ptr++; /* Skip leading zeros. */
|
||||
while (isdigit((int)*ptr)) ptr++, digits++; /* digits */
|
||||
while (*ptr >= '0' && *ptr <= '9') ptr++, digits++; /* digits */
|
||||
if (*ptr == '.') ptr++; /* decimal point */
|
||||
while (isdigit((int)*ptr)) ptr++, strscale++; /* digits */
|
||||
while (*ptr >= '0' && *ptr <= '9') ptr++, strscale++; /* digits */
|
||||
if ((*ptr != '\0') || (digits+strscale == 0))
|
||||
{
|
||||
*num = bc_copy_num (BCG(_zero_));
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #78878 (Buffer underflow in bc_shift_addsub)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
print @bcmul("\xB26483605105519922841849335928742092", bcpowmod(2, 65535, -4e-4));
|
||||
?>
|
||||
--EXPECT--
|
||||
bc math warning: non-zero scale in modulus
|
||||
0
|
||||
+1
-1
@@ -341,7 +341,7 @@ int dom_document_encoding_write(dom_object *obj, zval *newval)
|
||||
|
||||
str = zval_get_string(newval);
|
||||
|
||||
handler = xmlFindCharEncodingHandler(Z_STRVAL_P(newval));
|
||||
handler = xmlFindCharEncodingHandler(ZSTR_VAL(str));
|
||||
|
||||
if (handler != NULL) {
|
||||
xmlCharEncCloseFunc(handler);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Bug #77569 (Write Access Violation in DomImplementation)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('dom')) die('skip dom extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$imp = new DOMImplementation;
|
||||
$dom = $imp->createDocument("", "");
|
||||
$dom->encoding = null;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: main(): Invalid Document Encoding in %s on line %d
|
||||
+11
-4
@@ -3165,7 +3165,8 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
continue;
|
||||
if (maker_note->model && (!ImageInfo->model || strcmp(maker_note->model, ImageInfo->model)))
|
||||
continue;
|
||||
if (maker_note->id_string && strncmp(maker_note->id_string, value_ptr, maker_note->id_string_len))
|
||||
if (maker_note->id_string && value_len >= maker_note->id_string_len
|
||||
&& strncmp(maker_note->id_string, value_ptr, maker_note->id_string_len))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
@@ -3239,8 +3240,9 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
}
|
||||
|
||||
for (de=0;de<NumDirEntries;de++) {
|
||||
if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
|
||||
offset_base, data_len, displacement, section_index, 0, maker_note->tag_table)) {
|
||||
size_t offset = 2 + 12 * de;
|
||||
if (!exif_process_IFD_TAG(ImageInfo, dir_start + offset,
|
||||
offset_base, data_len - offset, displacement, section_index, 0, maker_note->tag_table)) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -3690,6 +3692,11 @@ static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf,
|
||||
{
|
||||
unsigned exif_value_2a, offset_of_ifd;
|
||||
|
||||
if (length < 2) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set the thumbnail stuff to nothing so we can test to see if they get set up */
|
||||
if (memcmp(CharBuf, "II", 2) == 0) {
|
||||
ImageInfo->motorola_intel = 0;
|
||||
@@ -3842,7 +3849,7 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sn = exif_file_sections_add(ImageInfo, marker, itemlen+1, NULL);
|
||||
sn = exif_file_sections_add(ImageInfo, marker, itemlen, NULL);
|
||||
Data = ImageInfo->file.list[sn].data;
|
||||
|
||||
/* Store first two pre-read bytes. */
|
||||
|
||||
@@ -70,7 +70,7 @@ Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal f
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > x00EE) in %sbug76557.php on line %d
|
||||
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > %s) in %sbug76557.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug76557.jpg): File structure corrupted in %sbug76557.php on line %d
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--TEST--
|
||||
Bug #78793: Use-after-free in exif parsing under memory sanitizer
|
||||
--FILE--
|
||||
<?php
|
||||
$f = "ext/exif/tests/bug77950.tiff";
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
@exif_read_data($f);
|
||||
}
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
===DONE===
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #78910: Heap-buffer-overflow READ in exif (OSS-Fuzz #19044)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(exif_read_data('data:image/jpg;base64,TU0AKgAAAAwgICAgAAIBDwAEAAAAAgAAACKSfCAgAAAAAEZVSklGSUxN'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: exif_read_data(): Read from TIFF: tag(0x927C, MakerNote ): Illegal format code 0x2020, switching to BYTE in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): Process tag(x927C=MakerNote ): Illegal format code 0x2020, suppose BYTE in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): IFD data too short: 0x0000 offset 0x000C in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): Invalid TIFF file in %s on line %d
|
||||
bool(false)
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #79282: Use-of-uninitialized-value in exif
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(exif_read_data('data://image/jpeg;base64,/9jhAAlFeGlmAAAg'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(): Missing TIFF alignment marker in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): File structure corrupted in %s on line %d
|
||||
|
||||
Warning: exif_read_data(): Invalid JPEG file in %s on line %d
|
||||
bool(false)
|
||||
@@ -138,6 +138,17 @@ static unsigned short cp950_pua_tbl[][4] = {
|
||||
{0xf70f,0xf848,0xc740,0xc8fe},
|
||||
};
|
||||
|
||||
static inline int is_in_cp950_pua(int c1, int c) {
|
||||
if ((c1 >= 0xfa && c1 <= 0xfe) || (c1 >= 0x8e && c1 <= 0xa0) ||
|
||||
(c1 >= 0x81 && c1 <= 0x8d) || (c1 >= 0xc7 && c1 <= 0xc8)) {
|
||||
return (c >=0x40 && c <= 0x7e) || (c >= 0xa1 && c <= 0xfe);
|
||||
}
|
||||
if (c1 == 0xc6) {
|
||||
return c >= 0xa1 && c <= 0xfe;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Big5 => wchar
|
||||
*/
|
||||
@@ -186,11 +197,7 @@ mbfl_filt_conv_big5_wchar(int c, mbfl_convert_filter *filter)
|
||||
|
||||
if (filter->from->no_encoding == mbfl_no_encoding_cp950) {
|
||||
/* PUA for CP950 */
|
||||
if (w <= 0 &&
|
||||
(((c1 >= 0xfa && c1 <= 0xfe) || (c1 >= 0x8e && c1 <= 0xa0) ||
|
||||
(c1 >= 0x81 && c1 <= 0x8d) ||(c1 >= 0xc7 && c1 <= 0xc8))
|
||||
&& ((c > 0x39 && c < 0x7f) || (c > 0xa0 && c < 0xff))) ||
|
||||
((c1 == 0xc6) && (c > 0xa0 && c < 0xff))) {
|
||||
if (w <= 0 && is_in_cp950_pua(c1, c)) {
|
||||
c2 = c1 << 8 | c;
|
||||
for (k = 0; k < sizeof(cp950_pua_tbl)/(sizeof(unsigned short)*4); k++) {
|
||||
if (c2 >= cp950_pua_tbl[k][2] && c2 <= cp950_pua_tbl[k][3]) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #79037: global buffer-overflow in `mbfl_filt_conv_big5_wchar`
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
var_dump(mb_convert_encoding("\x81\x3a", "UTF-8", "CP950"));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "?"
|
||||
@@ -1439,6 +1439,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
|
||||
char *str_key;
|
||||
zend_class_entry *ce = p_obj->c;
|
||||
phar_archive_object *phar_obj = p_obj->p;
|
||||
php_stream_statbuf ssb;
|
||||
|
||||
value = iter->funcs->get_current_data(iter);
|
||||
|
||||
@@ -1718,6 +1719,16 @@ after_open_fp:
|
||||
php_stream_copy_to_stream_ex(fp, p_obj->fp, PHP_STREAM_COPY_ALL, &contents_len);
|
||||
data->internal_file->uncompressed_filesize = data->internal_file->compressed_filesize =
|
||||
php_stream_tell(p_obj->fp) - data->internal_file->offset;
|
||||
if (php_stream_stat(fp, &ssb) != -1) {
|
||||
data->internal_file->flags = ssb.sb.st_mode & PHAR_ENT_PERM_MASK ;
|
||||
} else {
|
||||
#ifndef _WIN32
|
||||
mode_t mask;
|
||||
mask = umask(0);
|
||||
umask(mask);
|
||||
data->internal_file->flags &= ~mask;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (close_fp) {
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
--TEST--
|
||||
Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("phar")) die("skip");
|
||||
if (defined("PHP_WINDOWS_VERSION_MAJOR")) die("skip not for Windows")
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
umask(022);
|
||||
var_dump(decoct(umask()));
|
||||
chmod(__DIR__ . '/test79082/test79082-testfile', 0644);
|
||||
chmod(__DIR__ . '/test79082/test79082-testfile2', 0400);
|
||||
|
||||
foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
|
||||
clearstatcache();
|
||||
$phar = new PharData(__DIR__ . '/test79082.' . $ext, null, null, $mode);
|
||||
$phar->buildFromIterator(new \RecursiveDirectoryIterator(__DIR__ . '/test79082', \FilesystemIterator::SKIP_DOTS), __DIR__ . '/test79082');
|
||||
$phar->extractTo(__DIR__);
|
||||
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
|
||||
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
|
||||
unlink(__DIR__ . '/test79082-testfile');
|
||||
unlink(__DIR__ . '/test79082-testfile2');
|
||||
}
|
||||
foreach([Phar::TAR => 'tar', Phar::ZIP => 'zip'] as $mode => $ext) {
|
||||
clearstatcache();
|
||||
$phar = new PharData(__DIR__ . '/test79082-d.' . $ext, null, null, $mode);
|
||||
$phar->buildFromDirectory(__DIR__ . '/test79082');
|
||||
$phar->extractTo(__DIR__);
|
||||
var_dump(decoct(stat(__DIR__ . '/test79082-testfile')['mode']));
|
||||
var_dump(decoct(stat(__DIR__ . '/test79082-testfile2')['mode']));
|
||||
unlink(__DIR__ . '/test79082-testfile');
|
||||
unlink(__DIR__ . '/test79082-testfile2');
|
||||
}
|
||||
?>
|
||||
--CLEAN--
|
||||
<?
|
||||
unlink(__DIR__ . '/test79082.tar');
|
||||
unlink(__DIR__ . '/test79082.zip');
|
||||
unlink(__DIR__ . '/test79082-d.tar');
|
||||
unlink(__DIR__ . '/test79082-d.zip');
|
||||
?>
|
||||
--EXPECT--
|
||||
string(2) "22"
|
||||
string(6) "100644"
|
||||
string(6) "100400"
|
||||
string(6) "100644"
|
||||
string(6) "100400"
|
||||
string(6) "100644"
|
||||
string(6) "100400"
|
||||
string(6) "100644"
|
||||
string(6) "100400"
|
||||
@@ -0,0 +1 @@
|
||||
test
|
||||
@@ -0,0 +1 @@
|
||||
test
|
||||
@@ -2198,6 +2198,7 @@ static PHP_FUNCTION(session_create_id)
|
||||
/* Detect collision and retry */
|
||||
if (PS(mod)->s_validate_sid(&PS(mod_data), new_id) == FAILURE) {
|
||||
zend_string_release(new_id);
|
||||
new_id = NULL;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -3218,10 +3219,12 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
|
||||
if (PS(rfc1867_cleanup)) {
|
||||
php_session_rfc1867_cleanup(progress);
|
||||
} else {
|
||||
SEPARATE_ARRAY(&progress->data);
|
||||
add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1);
|
||||
Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed;
|
||||
php_session_rfc1867_update(progress, 1);
|
||||
if (!Z_ISUNDEF(progress->data)) {
|
||||
SEPARATE_ARRAY(&progress->data);
|
||||
add_assoc_bool_ex(&progress->data, "done", sizeof("done") - 1, 1);
|
||||
Z_LVAL_P(progress->post_bytes_processed) = data->post_bytes_processed;
|
||||
php_session_rfc1867_update(progress, 1);
|
||||
}
|
||||
}
|
||||
php_rshutdown_session_globals();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
--TEST--
|
||||
Bug #79091 (heap use-after-free in session_create_id())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('session')) die('skip session extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
class MySessionHandler implements SessionHandlerInterface, SessionIdInterface, SessionUpdateTimestampHandlerInterface
|
||||
{
|
||||
public function close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function destroy($session_id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function gc($maxlifetime)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function open($save_path, $session_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function read($session_id)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function write($session_id, $session_data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function create_sid()
|
||||
{
|
||||
return uniqid();
|
||||
}
|
||||
|
||||
public function updateTimestamp($key, $val)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function validateId($key)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ob_start();
|
||||
var_dump(session_set_save_handler(new MySessionHandler()));
|
||||
var_dump(session_start());
|
||||
ob_flush();
|
||||
session_create_id();
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Warning: session_create_id(): Failed to create new ID in %s on line %d
|
||||
@@ -0,0 +1,45 @@
|
||||
--TEST--
|
||||
Null Pointer Dereference in PHP Session Upload Progress
|
||||
--INI--
|
||||
error_reporting=0
|
||||
file_uploads=1
|
||||
upload_max_filesize=1024
|
||||
session.save_path=
|
||||
session.name=PHPSESSID
|
||||
session.serialize_handler=php
|
||||
session.use_strict_mode=0
|
||||
session.use_cookies=1
|
||||
session.use_only_cookies=0
|
||||
session.upload_progress.enabled=1
|
||||
session.upload_progress.cleanup=0
|
||||
session.upload_progress.prefix=upload_progress_
|
||||
session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
|
||||
session.upload_progress.freq=1%
|
||||
session.upload_progress.min_freq=0.000000001
|
||||
--COOKIE--
|
||||
PHPSESSID=session-upload
|
||||
--POST_RAW--
|
||||
Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
|
||||
-----------------------------20896060251896012921717172737
|
||||
Content-Disposition: form-data; name="PHPSESSID"
|
||||
|
||||
session-upload
|
||||
-----------------------------20896060251896012921717172737
|
||||
Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
|
||||
|
||||
ryat
|
||||
-----------------------------20896060251896012921717172737
|
||||
Content-Disposition: form-data; file="file"; ryat="filename"
|
||||
|
||||
1
|
||||
-----------------------------20896060251896012921717172737--
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
var_dump($_SESSION);
|
||||
session_destroy();
|
||||
|
||||
--EXPECTF--
|
||||
array(0) {
|
||||
}
|
||||
@@ -3,6 +3,7 @@ Bug #76348 (WSDL_CACHE_MEMORY causes Segmentation fault)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('soap')) die('skip soap extension not available');
|
||||
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -708,10 +708,10 @@ void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, zend_long cto
|
||||
|
||||
if (SPL_HAS_FLAG(ctor_flags, DIT_CTOR_FLAGS)) {
|
||||
flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_FILEINFO;
|
||||
parsed = zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &path, &len, &flags);
|
||||
parsed = zend_parse_parameters(ZEND_NUM_ARGS(), "p|l", &path, &len, &flags);
|
||||
} else {
|
||||
flags = SPL_FILE_DIR_KEY_AS_PATHNAME|SPL_FILE_DIR_CURRENT_AS_SELF;
|
||||
parsed = zend_parse_parameters(ZEND_NUM_ARGS(), "s", &path, &len);
|
||||
parsed = zend_parse_parameters(ZEND_NUM_ARGS(), "p", &path, &len);
|
||||
}
|
||||
if (SPL_HAS_FLAG(ctor_flags, SPL_FILE_DIR_SKIPDOTS)) {
|
||||
flags |= SPL_FILE_DIR_SKIPDOTS;
|
||||
|
||||
@@ -5,7 +5,7 @@ Bug #54291 (Crash iterating DirectoryIterator for dir name starting with \0)
|
||||
$dir = new DirectoryIterator("\x00/abc");
|
||||
$dir->isFile();
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught UnexpectedValueException: Failed to open directory "" in %s:%d
|
||||
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct() expects parameter 1 to be a valid path, string given in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): DirectoryIterator->__construct('\x00/abc')
|
||||
#1 {main}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #78863 (DirectoryIterator class silently truncates after a null byte)
|
||||
--FILE--
|
||||
<?php
|
||||
$dir = __DIR__ . '/bug78863';
|
||||
mkdir($dir);
|
||||
touch("$dir/bad");
|
||||
mkdir("$dir/sub");
|
||||
touch("$dir/sub/good");
|
||||
|
||||
$it = new DirectoryIterator(__DIR__ . "/bug78863\0/sub");
|
||||
foreach ($it as $fileinfo) {
|
||||
if (!$fileinfo->isDot()) {
|
||||
var_dump($fileinfo->getFilename());
|
||||
}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught UnexpectedValueException: DirectoryIterator::__construct() expects parameter 1 to be a valid path, string given in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): DirectoryIterator->__construct('%s')
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
--CLEAN--
|
||||
<?php
|
||||
$dir = __DIR__ . '/bug78863';
|
||||
unlink("$dir/sub/good");
|
||||
rmdir("$dir/sub");
|
||||
unlink("$dir/bad");
|
||||
rmdir($dir);
|
||||
?>
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
/*
|
||||
DO NOT EDIT THIS FILE!
|
||||
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
the information found in the various php7/ext/.../CREDITS and
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
CREDITS file instead
|
||||
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ CREDIT_LINE("FTP", "Stefan Esser, Andrew Skalski");
|
||||
CREDIT_LINE("GD imaging", "Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger");
|
||||
CREDIT_LINE("GetText", "Alex Plotnick");
|
||||
CREDIT_LINE("GNU GMP support", "Stanislav Malyshev");
|
||||
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi ");
|
||||
CREDIT_LINE("Iconv", "Rui Hirokawa, Stig Bakken, Moriyoshi Koizumi");
|
||||
CREDIT_LINE("IMAP", "Rex Logan, Mark Musone, Brian Wang, Kaj-Michael Lang, Antoni Pamies Olive, Rasmus Lerdorf, Andrew Skalski, Chuck Hagenbuch, Daniel R Kalowsky");
|
||||
CREDIT_LINE("Input Filter", "Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye, Ilia Alshanetsky");
|
||||
CREDIT_LINE("InterBase", "Jouni Ahto, Andrew Avdeev, Ard Biesheuvel");
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
/*
|
||||
DO NOT EDIT THIS FILE!
|
||||
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
it has been automaticaly created by php7/scripts/credits from
|
||||
the information found in the various php7/ext/.../CREDITS and
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
php7/sapi/.../CREDITS files
|
||||
|
||||
if you want to change an entry you have to edit the appropriate
|
||||
CREDITS file instead
|
||||
|
||||
*/
|
||||
|
||||
@@ -211,7 +211,7 @@ PHP_FUNCTION(link)
|
||||
|
||||
/*First argument to link function is the target and hence should go to frompath
|
||||
Second argument to link function is the link itself and hence should go to topath */
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &frompath, &frompath_len, &topath, &topath_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &frompath, &frompath_len, &topath, &topath_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4816,7 +4816,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
switch (state) {
|
||||
case 1: /* HTML/XML */
|
||||
lc = '>';
|
||||
if (is_xml && *(p -1) == '-') {
|
||||
if (is_xml && p >= buf + 1 && *(p-1) == '-') {
|
||||
break;
|
||||
}
|
||||
in_q = state = is_xml = 0;
|
||||
@@ -4837,7 +4837,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
break;
|
||||
|
||||
case 2: /* PHP */
|
||||
if (!br && lc != '\"' && *(p-1) == '?') {
|
||||
if (!br && lc != '\"' && p >= buf + 1 && *(p-1) == '?') {
|
||||
in_q = state = 0;
|
||||
tp = tbuf;
|
||||
}
|
||||
@@ -4866,7 +4866,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
if (state == 4) {
|
||||
/* Inside <!-- comment --> */
|
||||
break;
|
||||
} else if (state == 2 && *(p-1) != '\\') {
|
||||
} else if (state == 2 && p >= buf + 1 && *(p-1) != '\\') {
|
||||
if (lc == c) {
|
||||
lc = '\0';
|
||||
} else if (lc != '\\') {
|
||||
@@ -4893,7 +4893,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
|
||||
case '!':
|
||||
/* JavaScript & Other HTML scripting languages */
|
||||
if (state == 1 && *(p-1) == '<') {
|
||||
if (state == 1 && p >= buf + 1 && *(p-1) == '<') {
|
||||
state = 3;
|
||||
lc = c;
|
||||
} else {
|
||||
@@ -4920,7 +4920,7 @@ PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, uint8_t *stateptr, const
|
||||
|
||||
case '?':
|
||||
|
||||
if (state == 1 && *(p-1) == '<') {
|
||||
if (state == 1 && p >= buf + 1 && *(p-1) == '<') {
|
||||
br=0;
|
||||
state=2;
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
--TEST--
|
||||
Bug #79099 (OOB read in php_strip_tags_ex)
|
||||
--FILE--
|
||||
<?php
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<?\n\"\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<\0\n!\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
|
||||
$stream = fopen('php://memory', 'w+');
|
||||
fputs($stream, "<\0\n?\n");
|
||||
rewind($stream);
|
||||
var_dump(fgetss($stream));
|
||||
var_dump(fgetss($stream));
|
||||
fclose($stream);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
string(0) ""
|
||||
@@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #78862 (link() silently truncates after a null byte on Windows)
|
||||
--FILE--
|
||||
<?php
|
||||
file_put_contents(__DIR__ . '/bug78862.target', 'foo');
|
||||
var_dump(link(__DIR__ . "/bug78862.target\0more", __DIR__ . "/bug78862.link\0more"));
|
||||
var_dump(file_exists(__DIR__ . '/bug78862.link'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: link() expects parameter 1 to be a valid path, string given in %s on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . '/bug78862.target');
|
||||
unlink(__DIR__ . '/bug78862.link');
|
||||
?>
|
||||
+1
-1
@@ -680,7 +680,7 @@ PHP_FUNCTION(get_headers)
|
||||
php_stream_context *context;
|
||||
|
||||
ZEND_PARSE_PARAMETERS_START(1, 3)
|
||||
Z_PARAM_STRING(url, url_len)
|
||||
Z_PARAM_PATH(url, url_len)
|
||||
Z_PARAM_OPTIONAL
|
||||
Z_PARAM_LONG(format)
|
||||
Z_PARAM_RESOURCE_EX(zcontext, 1, 0)
|
||||
|
||||
+4
-4
@@ -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 27
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "7.2.27-dev"
|
||||
#define PHP_VERSION_ID 70227
|
||||
#define PHP_RELEASE_VERSION 29
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "7.2.29"
|
||||
#define PHP_VERSION_ID 70229
|
||||
Reference in new issue
Block a user