Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 3a24d74

Browse files
committed
replace somewhere in mivExchangeBaseItem for attachments with localhost
According to the name choosen, the domain should points to somewhere but should not be a real domain. To avoid domain resolution to somewhere.com by some browsers, we use the reserved domain localhost.
1 parent dabd8c4 commit 3a24d74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/interface/exchangeBaseItem/mivExchangeBaseItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2891,7 +2891,7 @@ mivExchangeBaseItem.prototype = {
28912891
for (var fileAttachment of Object.values(fileAttachments)) {
28922892
var newAttachment = cal.createAttachment();
28932893
newAttachment.setParameter("X-AttachmentId", xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id"));
2894-
newAttachment.uri = Services.io.newURI("http://somewhere/?id=" + encodeURIComponent(xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Name")) + "&size=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Size", "")) + "&calendarid=" + encodeURIComponent(this.calendar.id) + "&isinline=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:IsInline", "false")) + "&contentid=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:ContentId", "<NOPE>")));
2894+
newAttachment.uri = Services.io.newURI("http://localhost/?id=" + encodeURIComponent(xml2json.getAttributeByTag(fileAttachment, "t:AttachmentId", "Id")) + "&name=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Name")) + "&size=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:Size", "")) + "&calendarid=" + encodeURIComponent(this.calendar.id) + "&isinline=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:IsInline", "false")) + "&contentid=" + encodeURIComponent(xml2json.getTagValue(fileAttachment, "t:ContentId", "<NOPE>")));
28952895

28962896
this._attachments.push(newAttachment.clone());
28972897
this._calEvent.addAttachment(newAttachment);

0 commit comments

Comments
 (0)