Bug 1411732 - prevent file name tricks for external http attachments. r=jorgk

This commit is contained in:
Magnus Melin 2018-04-24 22:25:45 +03:00
Родитель b7f61a8059
Коммит 494f393487
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -1826,6 +1826,19 @@ function AttachmentInfo(contentType, url, name, uri,
this.partID = match && match[1];
}
// Make sure to communicate it if it's an external http attachment and not a
// local attachment. For feeds attachments (enclosures) are always remote,
// so there is nothing to communicate.
if (isExternalAttachment && url.startsWith("http") &&
!gFolderDisplay.selectedMessageIsFeed) {
if (this.name) {
this.name = url + " - " + this.name;
}
else {
this.name = url;
}
}
this.url = url;
}