зеркало из https://github.com/mozilla/pjs.git
Fix for 128535. Used case sensitive hashing on email address when locating the associated card. r=ducarroz, sr=sspitzer, a=asa.
This commit is contained in:
Родитель
cf1e007f02
Коммит
aeaf4de050
|
@ -134,7 +134,9 @@ NS_IMETHODIMP nsAbAddressCollecter::CollectAddress(const char *address)
|
|||
nsCOMPtr <nsIAbCard> existingCard;
|
||||
nsCOMPtr <nsIAbCard> cardInstance;
|
||||
|
||||
rv = m_historyAB->GetCardFromAttribute(m_historyDirectory, kPriEmailColumn, curAddress, PR_TRUE /* caseInsensitive */, getter_AddRefs(existingCard));
|
||||
// Please DO NOT change the 3rd param of GetCardFromAttribute() call to
|
||||
// PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
|
||||
rv = m_historyAB->GetCardFromAttribute(m_historyDirectory, kPriEmailColumn, curAddress, PR_FALSE /* retain case */, getter_AddRefs(existingCard));
|
||||
|
||||
if (!existingCard)
|
||||
{
|
||||
|
|
|
@ -1390,7 +1390,9 @@ nsresult nsAddrDatabase::AddListCardColumnsToRow
|
|||
if (email)
|
||||
{
|
||||
nsIMdbRow *pCardRow = nsnull;
|
||||
err = GetRowFromAttribute(kPriEmailColumn, NS_ConvertUCS2toUTF8(email).get(), PR_TRUE /* caseInsensitive */, &pCardRow);
|
||||
// Please DO NOT change the 3rd param of GetRowFromAttribute() call to
|
||||
// PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
|
||||
err = GetRowFromAttribute(kPriEmailColumn, NS_ConvertUCS2toUTF8(email).get(), PR_FALSE /* retain case */, &pCardRow);
|
||||
PRBool cardWasAdded = PR_FALSE;
|
||||
if (NS_FAILED(err) || !pCardRow)
|
||||
{
|
||||
|
@ -2037,7 +2039,9 @@ NS_IMETHODIMP nsAddrDatabase::AddLdifListMember(nsIMdbRow* listRow, const char*
|
|||
valueString.Right(email, valueString.Length() - emailPos);
|
||||
char* emailAddress = ToNewCString(email);
|
||||
nsIMdbRow *cardRow = nsnull;
|
||||
nsresult result = GetRowFromAttribute(kPriEmailColumn, emailAddress, PR_TRUE /* lower case */, &cardRow);
|
||||
// Please DO NOT change the 3rd param of GetRowFromAttribute() call to
|
||||
// PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
|
||||
nsresult result = GetRowFromAttribute(kPriEmailColumn, emailAddress, PR_FALSE /* retain case */, &cardRow);
|
||||
if (cardRow)
|
||||
{
|
||||
mdbOid outOid;
|
||||
|
|
|
@ -3667,7 +3667,9 @@ NS_IMETHODIMP nsMsgCompose::CheckAndPopulateRecipients(PRBool populateMailList,
|
|||
|
||||
/* Then if we have a card for this email address */
|
||||
nsCAutoString emailStr; emailStr.AssignWithConversion(recipient->mEmail);
|
||||
rv = abDataBase->GetCardFromAttribute(abDirectory, kPriEmailColumn, emailStr.get(), PR_TRUE /* caseInsensitive */, getter_AddRefs(existingCard));
|
||||
// Please DO NOT change the 3rd param of GetCardFromAttribute() call to
|
||||
// PR_TRUE (ie, case insensitive) without reading bugs #128535 and #121478.
|
||||
rv = abDataBase->GetCardFromAttribute(abDirectory, kPriEmailColumn, emailStr.get(), PR_FALSE /* retain case */, getter_AddRefs(existingCard));
|
||||
if (NS_SUCCEEDED(rv) && existingCard)
|
||||
{
|
||||
recipient->mPreferFormat = nsIAbPreferMailFormat::unknown;
|
||||
|
|
Загрузка…
Ссылка в новой задаче