From 59be4e796441e494f25b18ece7438dbf02442e47 Mon Sep 17 00:00:00 2001 From: yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> Date: Sat, 24 Aug 2019 22:08:56 +0000 Subject: security + multiple replyTo addreses --- Postman/PostmanUtils.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Postman/PostmanUtils.php') diff --git a/Postman/PostmanUtils.php b/Postman/PostmanUtils.php index 335d0f3..6f628ec 100644 --- a/Postman/PostmanUtils.php +++ b/Postman/PostmanUtils.php @@ -345,6 +345,15 @@ class PostmanUtils { if ( ! isset( PostmanUtils::$emailValidator ) ) { PostmanUtils::$emailValidator = new Postman_Zend_Validate_EmailAddress(); } + if ( strpos( $email, ',' ) !== false ) { + $emails = explode(',', $email); + $result = []; + foreach ( $emails as $email ) { + $result[] = PostmanUtils::$emailValidator->isValid( $email ); + } + + return ! in_array(false, $result ); + } return PostmanUtils::$emailValidator->isValid( $email ); } -- cgit v1.2.3