зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 83541. Use user domain for construct a part ID. The current code was bogus! R=varada, SR=sspitzer
This commit is contained in:
Родитель
13654d2c38
Коммит
3ca9b3f7a8
|
@ -1866,7 +1866,7 @@ mime_gen_content_id(PRUint32 aPartNum, const char *aEmailAddress)
|
|||
GenerateGlobalRandomBytes(rand_buf2, randLen);
|
||||
|
||||
// Find the @domain.com string...
|
||||
if ((!aEmailAddress) || (!*aEmailAddress))
|
||||
if (aEmailAddress && *aEmailAddress)
|
||||
domain = PL_strchr(aEmailAddress, '@');
|
||||
|
||||
if (!domain)
|
||||
|
|
|
@ -1794,16 +1794,9 @@ nsMsgComposeAndSend::ProcessMultipartRelated(PRInt32 *aMailboxCount, PRInt32 *aN
|
|||
//
|
||||
// Next, generate a content id for use with this part
|
||||
//
|
||||
PRUnichar *myEmail = nsnull;
|
||||
|
||||
if (NS_FAILED(mCompFields->GetFrom(&myEmail)))
|
||||
m_attachments[i].m_content_id = mime_gen_content_id(locCount+1, nsnull);
|
||||
else
|
||||
{
|
||||
nsCAutoString tEmail; tEmail.AssignWithConversion(myEmail);
|
||||
m_attachments[i].m_content_id = mime_gen_content_id(locCount+1, tEmail);
|
||||
|
||||
}
|
||||
nsXPIDLCString email;
|
||||
mUserIdentity->GetEmail(getter_Copies(email));
|
||||
m_attachments[i].m_content_id = mime_gen_content_id(locCount+1, email.get());
|
||||
|
||||
if (!m_attachments[i].m_content_id)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче