summaryrefslogtreecommitdiff
path: root/ext/imap/tests
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-10-12 16:30:34 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-10-12 16:30:48 +0200
commit11c752a5f5c0fb23e87e8cb9c4147f1a5374fe06 (patch)
tree89963374e56ae7b4e782f6680869f97533f41570 /ext/imap/tests
parent0443c824a3a716873440c8e239d40c458d966a21 (diff)
parent216d6a024aeee19a7bd532d0ddaad2a4aff7e097 (diff)
downloadphp-git-11c752a5f5c0fb23e87e8cb9c4147f1a5374fe06.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #80216: imap_mail_compose() does not validate types/encodings
Diffstat (limited to 'ext/imap/tests')
-rw-r--r--ext/imap/tests/bug80216.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/imap/tests/bug80216.phpt b/ext/imap/tests/bug80216.phpt
new file mode 100644
index 0000000000..ccaf1e1e39
--- /dev/null
+++ b/ext/imap/tests/bug80216.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #80216 (imap_mail_compose() does not validate types/encodings)
+--SKIPIF--
+<?php
+if (!extension_loaded('imap')) die('skip imap extension not available');
+?>
+--FILE--
+<?php
+imap_mail_compose([], [['type' => TYPEMULTIPART], []]);
+imap_mail_compose([], [['type' => 12]]);
+imap_mail_compose([], [['type' => TYPEMULTIPART], ['type' => 12]]);
+imap_mail_compose([], [['encoding' => 8]]);
+imap_mail_compose([], [['type' => TYPEMULTIPART], ['encoding' => 8]]);
+echo "done\n";
+?>
+--EXPECT--
+done