summaryrefslogtreecommitdiff
path: root/ext/session/tests
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2020-02-15 20:52:19 -0800
committerStanislav Malyshev <stas@php.net>2020-02-17 00:20:17 -0800
commit282bfb109ecd07cd76761c098304a45bd214e439 (patch)
treeabfdf5e4e73f2c7e96a34c2bdbe3f6b0ab0c715f /ext/session/tests
parent73a4c50309b24fc6232299ee14a76249c63c7b5c (diff)
downloadphp-git-282bfb109ecd07cd76761c098304a45bd214e439.tar.gz
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
Diffstat (limited to 'ext/session/tests')
-rw-r--r--ext/session/tests/bug79221.phpt45
1 files changed, 45 insertions, 0 deletions
diff --git a/ext/session/tests/bug79221.phpt b/ext/session/tests/bug79221.phpt
new file mode 100644
index 0000000000..b0972c4697
--- /dev/null
+++ b/ext/session/tests/bug79221.phpt
@@ -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) {
+}