Closed Bug 1571724 Opened 4 months ago Closed 4 months ago

Thunderbird 69.0 b1 trucates recepients (5 first characters) using MAPI's nsMapiHook::PopulateCompFieldsW()

Categories

(MailNews Core :: Simple MAPI, defect)

defect
Not set

Tracking

(thunderbird_esr6868+ fixed, thunderbird69 fixed, thunderbird70 fixed)

RESOLVED FIXED
Thunderbird 70.0
Tracking Status
thunderbird_esr68 68+ fixed
thunderbird69 --- fixed
thunderbird70 --- fixed

People

(Reporter: baldo, Assigned: jorgk-bmo)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Send an email from another application (for instance from Microsoft Access with "DoCmd.SendObject") specifying the recepient (ex : recipient@destination.com)

Actual results:

The recipient's address is truncated : the first 5 characters disappear :

ient@destination.com

in the "For :" field

Some beta versions since the 60 branch sometimes displayed nothing, some other times also truncate the 5 first characters.

Expected results:

As in the non beta versions that work OK with the same program, it should display
recipient@destination.com.

Hmm, that's bad, I'll take a look. Not many applications using MAPI specify the recipient.

Five rings a bell, it must be this code, but that looks right:
https://searchfox.org/comm-central/rev/2d079399f2abf8119b05fbd6bb5782b28412d881/mailnews/mapi/mapihook/src/msgMapiHook.cpp#605

But this doesn't :-(
https://searchfox.org/comm-central/rev/2d079399f2abf8119b05fbd6bb5782b28412d881/mailnews/mapi/mapihook/src/msgMapiHook.cpp#713

nsMapiHook::PopulateCompFieldsW() is new.

Assignee: nobody → jorgk
Status: UNCONFIRMED → ASSIGNED
Component: Message Compose Window → Simple MAPI
Ever confirmed: true
Product: Thunderbird → MailNews Core
Summary: Thunderbird 69.0 b1 trucates recepients (5 first characters) using MAPI → Thunderbird 69.0 b1 trucates recepients (5 first characters) using MAPI's nsMapiHook::PopulateCompFieldsW()
Attached patch 1571724-mapi.patch (obsolete) — Splinter Review

I don't know how this slipped through my review :-(

First reviewer wins.

Attachment #9083441 - Flags: review?(mkmelin+mozilla)
Attachment #9083441 - Flags: review?(acelists)
Attachment #9083441 - Flags: approval-comm-esr68+
Attachment #9083441 - Flags: approval-comm-beta+
Comment on attachment 9083441 [details] [diff] [review]
1571724-mapi.patch

Review of attachment 9083441 [details] [diff] [review]:
-----------------------------------------------------------------

Looks ok to me, r=mkmelin
Attachment #9083441 - Flags: review?(mkmelin+mozilla)
Attachment #9083441 - Flags: review?(acelists)
Attachment #9083441 - Flags: review+

I've chatted a bit with Eric Rahm on IRC to see whether we need nsDependentSubstring here. In the end it's cheaper to use native Windows functions, in this case _wcsnicmp, wide string N ignore case compare.

Attachment #9083441 - Attachment is obsolete: true
Attachment #9083463 - Flags: review+
Attachment #9083463 - Flags: approval-comm-esr68+
Attachment #9083463 - Flags: approval-comm-beta+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/c423618c2ac6
Fix logic error in string comparison in nsMapiHook::PopulateCompFieldsW(). r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 70.0
Version: 69 → 68

I tested the 32 bit TB 68.0 ESR version on another PC, it worked like a charm with the full address. You can consider the bug as fixed and don't worry, if I see it appear again I will let you know, I use MAPI very frequently. Thanks again.

I confirm that the problem is fixed with TB 69 beta 3.

You need to log in before you can comment on or make changes to this bug.