From 9282a06c8e1e298c20b3111867c8b28a93e389f5 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Sun, 20 Oct 2019 20:49:36 +0200 Subject: [PATCH] Use shorter hashes for CID values, see #1691 --- src/PHPMailer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PHPMailer.php b/src/PHPMailer.php index 21e9df1a..9e857724 100644 --- a/src/PHPMailer.php +++ b/src/PHPMailer.php @@ -4022,7 +4022,8 @@ class PHPMailer if ('.' === $directory) { $directory = ''; } - $cid = hash('sha256', $url) . '@phpmailer.0'; // RFC2392 S 2 + // RFC2392 S 2 + $cid = substr(hash('sha256', $data), 0, 32) . '@phpmailer.0'; if (strlen($basedir) > 1 && '/' !== substr($basedir, -1)) { $basedir .= '/'; }