summaryrefslogtreecommitdiff
path: root/program/lib/Mail/mime.php
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2010-05-21 03:24:25 +0000
committersvncommit <devs@roundcube.net>2010-05-21 03:24:25 +0000
commit141eb8a497d847069cf87ce0d204614596338352 (patch)
treedcf5edc282f2ab52b593a0081b280a8cf817790a /program/lib/Mail/mime.php
parentdffcaa59db930408b9f07a300ba67a7933d2eab0 (diff)
Fix double-addition of e-mail domain to content ID in HTML images
Diffstat (limited to 'program/lib/Mail/mime.php')
-rw-r--r--program/lib/Mail/mime.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Mail/mime.php b/program/lib/Mail/mime.php
index ca54a8a6c..9065d469a 100644
--- a/program/lib/Mail/mime.php
+++ b/program/lib/Mail/mime.php
@@ -848,8 +848,10 @@ class Mail_mime
$domainID = "@localhost";
}
foreach ($this->_html_images as $i => $img) {
- $this->_html_images[$i]['cid']
- = $this->_html_images[$i]['cid'] . $domainID;
+ $cid = $this->_html_images[$i]['cid'];
+ if (!preg_match('#'.preg_quote($domainID).'$#', $cid)) {
+ $this->_html_images[$i]['cid'] = $cid . $domainID;
+ }
}
}