Changeset 3439734
- Timestamp:
- 01/14/2026 05:25:55 PM (2 months ago)
- Location:
- mailarchiver
- Files:
-
- 16 edited
- 1 copied
-
tags/4.4.0 (copied) (copied from mailarchiver/trunk)
-
tags/4.4.0/CHANGELOG.md (modified) (1 diff)
-
tags/4.4.0/includes/features/class-capture.php (modified) (2 diffs)
-
tags/4.4.0/includes/listeners/class-abstractlistener.php (modified) (1 diff)
-
tags/4.4.0/includes/listeners/class-corelistener.php (modified) (1 diff)
-
tags/4.4.0/includes/listeners/class-wpmslistener.php (modified) (1 diff)
-
tags/4.4.0/init.php (modified) (1 diff)
-
tags/4.4.0/mailarchiver.php (modified) (1 diff)
-
tags/4.4.0/readme.txt (modified) (1 diff)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/includes/features/class-capture.php (modified) (2 diffs)
-
trunk/includes/listeners/class-abstractlistener.php (modified) (1 diff)
-
trunk/includes/listeners/class-corelistener.php (modified) (1 diff)
-
trunk/includes/listeners/class-wpmslistener.php (modified) (1 diff)
-
trunk/init.php (modified) (1 diff)
-
trunk/mailarchiver.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mailarchiver/tags/4.4.0/CHANGELOG.md
r3400895 r3439734 3 3 4 4 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and **MailArchiver** adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 5 6 ## [4.4.0] - 2026-01-14 7 8 ### Added 9 - Compatibility with `name <email@example.com>` email addresses (thanks to [Willy Bahuaud](https://github.com/willybahuaud)). 10 11 ### Fixed 12 - [SEC005] XSS vulnerability in the "to" field (thanks to [Willy Bahuaud](https://github.com/willybahuaud)). 5 13 6 14 ## [4.3.0] - 2025-11-22 -
mailarchiver/tags/4.4.0/includes/features/class-capture.php
r2606924 r3439734 42 42 */ 43 43 public function __construct() { 44 } 45 46 /** 47 * Normalizes "to" fields. 48 * 49 * @param array $tos The tos. 50 * @return array The normalized tos. 51 * @since 4.4.0 52 */ 53 private static function to( $tos ) { 54 $result = []; 55 if ( 0 < count( $tos ) ) { 56 foreach ( $tos as $to ) { 57 if ( str_contains( $to, '@' ) ) { 58 $result[] = $to; 59 } else { 60 $result[] = '[malformed email address]'; 61 } 62 } 63 } else { 64 $result[] = '[malformed email address]'; 65 } 66 return $result; 44 67 } 45 68 … … 191 214 $mail['from'] = self::from( $mail['headers'] ); 192 215 } 216 if ( array_key_exists( 'to', $mail ) ) { 217 $mail['to'] = self::to( $mail['to'] ); 218 } 193 219 $mail['attachments'] = self::attachments( $mail['attachments'] ); 194 220 $mail['headers'] = self::headers( $mail['headers'] ); -
mailarchiver/tags/4.4.0/includes/listeners/class-abstractlistener.php
r2552008 r3439734 139 139 140 140 /** 141 * Recursively get all "to" email adresses. 142 * 143 * @since 4.3.1 144 */ 145 protected function get_all_emails( $a, &$result ) { 146 if ( is_array( $a ) ) { 147 foreach ( $a as $item ) { 148 $this->get_all_emails( $item, $result ); 149 } 150 } 151 if ( is_object( $a ) ) { 152 foreach ( (array) $a as $item ) { 153 $this->get_all_emails( $item, $result ); 154 } 155 } 156 if ( is_string( $a ) && str_contains( $a, '@' ) ) { 157 if ( preg_match( "/[a-z0-9!#$%&'+\/=?^_{|}~-]+[a-z0-9!#$%&'*+\/.=?^_{|}~-]+@[\p{L}.-]+[\p{L}0-9]+/iu", $a, $matches ) ) { 158 if ( 1 === count( $matches ) ) { 159 $result[] = $matches[0] ; 160 } 161 } 162 } 163 } 164 165 /** 141 166 * Sets the listener properties. 142 167 * -
mailarchiver/tags/4.4.0/includes/listeners/class-corelistener.php
r3195019 r3439734 110 110 111 111 /** 112 * Recursively get all "to" email adresses.113 *114 * @since 1.0.0115 */116 private function get_all_emails( $a, &$result ) {117 if ( is_array( $a ) ) {118 foreach ( $a as $item ) {119 $this->get_all_emails( $item, $result );120 }121 }122 if ( is_object( $a ) ) {123 foreach ( (array) $a as $item ) {124 $this->get_all_emails( $item, $result );125 }126 }127 if ( is_string( $a ) && false !== strpos( $a, '@' ) ) {128 $result[] = trim( $a) ;129 }130 }131 132 /**133 112 * "wp_mail" event. 134 113 * -
mailarchiver/tags/4.4.0/includes/listeners/class-wpmslistener.php
r2552008 r3439734 66 66 67 67 /** 68 * Recursively get all "to" email adresses.69 *70 * @since 1.0.071 */72 private function get_all_emails( $a, &$result ) {73 if ( is_array( $a ) ) {74 foreach ( $a as $item ) {75 $this->get_all_emails( $item, $result );76 }77 }78 if ( is_object( $a ) ) {79 foreach ( (array) $a as $item ) {80 $this->get_all_emails( $item, $result );81 }82 }83 if ( is_string( $a ) && false !== strpos( $a, '@' ) ) {84 $result[] = trim( $a) ;85 }86 }87 88 /**89 68 * "phpmailer_init" action. 90 69 * -
mailarchiver/tags/4.4.0/init.php
r3400895 r3439734 13 13 define( 'MAILARCHIVER_PRODUCT_ABBREVIATION', 'mailarchiver' ); 14 14 define( 'MAILARCHIVER_SLUG', 'mailarchiver' ); 15 define( 'MAILARCHIVER_VERSION', '4. 3.0' );15 define( 'MAILARCHIVER_VERSION', '4.4.0' ); 16 16 define( 'MAILARCHIVER_MONOLOG_VERSION', '2.9.3' ); 17 17 define( 'MAILARCHIVER_CODENAME', '"-"' ); -
mailarchiver/tags/4.4.0/mailarchiver.php
r3400895 r3439734 11 11 * Plugin URI: https://perfops.one/mailarchiver 12 12 * Description: Automatically archive and store all emails sent from your site. 13 * Version: 4. 3.013 * Version: 4.4.0 14 14 * Requires at least: 6.2 15 15 * Requires PHP: 8.1 -
mailarchiver/tags/4.4.0/readme.txt
r3400895 r3439734 5 5 Requires PHP: 8.1 6 6 Tested up to: 6.9 7 Stable tag: 4. 3.07 Stable tag: 4.4.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
mailarchiver/trunk/CHANGELOG.md
r3400895 r3439734 3 3 4 4 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and **MailArchiver** adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 5 6 ## [4.4.0] - 2026-01-14 7 8 ### Added 9 - Compatibility with `name <email@example.com>` email addresses (thanks to [Willy Bahuaud](https://github.com/willybahuaud)). 10 11 ### Fixed 12 - [SEC005] XSS vulnerability in the "to" field (thanks to [Willy Bahuaud](https://github.com/willybahuaud)). 5 13 6 14 ## [4.3.0] - 2025-11-22 -
mailarchiver/trunk/includes/features/class-capture.php
r2606924 r3439734 42 42 */ 43 43 public function __construct() { 44 } 45 46 /** 47 * Normalizes "to" fields. 48 * 49 * @param array $tos The tos. 50 * @return array The normalized tos. 51 * @since 4.4.0 52 */ 53 private static function to( $tos ) { 54 $result = []; 55 if ( 0 < count( $tos ) ) { 56 foreach ( $tos as $to ) { 57 if ( str_contains( $to, '@' ) ) { 58 $result[] = $to; 59 } else { 60 $result[] = '[malformed email address]'; 61 } 62 } 63 } else { 64 $result[] = '[malformed email address]'; 65 } 66 return $result; 44 67 } 45 68 … … 191 214 $mail['from'] = self::from( $mail['headers'] ); 192 215 } 216 if ( array_key_exists( 'to', $mail ) ) { 217 $mail['to'] = self::to( $mail['to'] ); 218 } 193 219 $mail['attachments'] = self::attachments( $mail['attachments'] ); 194 220 $mail['headers'] = self::headers( $mail['headers'] ); -
mailarchiver/trunk/includes/listeners/class-abstractlistener.php
r2552008 r3439734 139 139 140 140 /** 141 * Recursively get all "to" email adresses. 142 * 143 * @since 4.3.1 144 */ 145 protected function get_all_emails( $a, &$result ) { 146 if ( is_array( $a ) ) { 147 foreach ( $a as $item ) { 148 $this->get_all_emails( $item, $result ); 149 } 150 } 151 if ( is_object( $a ) ) { 152 foreach ( (array) $a as $item ) { 153 $this->get_all_emails( $item, $result ); 154 } 155 } 156 if ( is_string( $a ) && str_contains( $a, '@' ) ) { 157 if ( preg_match( "/[a-z0-9!#$%&'+\/=?^_{|}~-]+[a-z0-9!#$%&'*+\/.=?^_{|}~-]+@[\p{L}.-]+[\p{L}0-9]+/iu", $a, $matches ) ) { 158 if ( 1 === count( $matches ) ) { 159 $result[] = $matches[0] ; 160 } 161 } 162 } 163 } 164 165 /** 141 166 * Sets the listener properties. 142 167 * -
mailarchiver/trunk/includes/listeners/class-corelistener.php
r3195019 r3439734 110 110 111 111 /** 112 * Recursively get all "to" email adresses.113 *114 * @since 1.0.0115 */116 private function get_all_emails( $a, &$result ) {117 if ( is_array( $a ) ) {118 foreach ( $a as $item ) {119 $this->get_all_emails( $item, $result );120 }121 }122 if ( is_object( $a ) ) {123 foreach ( (array) $a as $item ) {124 $this->get_all_emails( $item, $result );125 }126 }127 if ( is_string( $a ) && false !== strpos( $a, '@' ) ) {128 $result[] = trim( $a) ;129 }130 }131 132 /**133 112 * "wp_mail" event. 134 113 * -
mailarchiver/trunk/includes/listeners/class-wpmslistener.php
r2552008 r3439734 66 66 67 67 /** 68 * Recursively get all "to" email adresses.69 *70 * @since 1.0.071 */72 private function get_all_emails( $a, &$result ) {73 if ( is_array( $a ) ) {74 foreach ( $a as $item ) {75 $this->get_all_emails( $item, $result );76 }77 }78 if ( is_object( $a ) ) {79 foreach ( (array) $a as $item ) {80 $this->get_all_emails( $item, $result );81 }82 }83 if ( is_string( $a ) && false !== strpos( $a, '@' ) ) {84 $result[] = trim( $a) ;85 }86 }87 88 /**89 68 * "phpmailer_init" action. 90 69 * -
mailarchiver/trunk/init.php
r3400895 r3439734 13 13 define( 'MAILARCHIVER_PRODUCT_ABBREVIATION', 'mailarchiver' ); 14 14 define( 'MAILARCHIVER_SLUG', 'mailarchiver' ); 15 define( 'MAILARCHIVER_VERSION', '4. 3.0' );15 define( 'MAILARCHIVER_VERSION', '4.4.0' ); 16 16 define( 'MAILARCHIVER_MONOLOG_VERSION', '2.9.3' ); 17 17 define( 'MAILARCHIVER_CODENAME', '"-"' ); -
mailarchiver/trunk/mailarchiver.php
r3400895 r3439734 11 11 * Plugin URI: https://perfops.one/mailarchiver 12 12 * Description: Automatically archive and store all emails sent from your site. 13 * Version: 4. 3.013 * Version: 4.4.0 14 14 * Requires at least: 6.2 15 15 * Requires PHP: 8.1 -
mailarchiver/trunk/readme.txt
r3400895 r3439734 5 5 Requires PHP: 8.1 6 6 Tested up to: 6.9 7 Stable tag: 4. 3.07 Stable tag: 4.4.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset
for help on using the changeset viewer.