Closed Bug 128535 Opened 23 years ago Closed 23 years ago

LDIF import: email addresses with capital letters can't be added as list members

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect, P2)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: cavin, Assigned: cavin)

References

Details

Attachments

(4 files, 3 obsolete files)

This is spun off bug 62084. When I import members of mailing lists with capital letters in the email address, they are rejected and are not added to the lists. For example, if I have a card info in the LDIF file as: dn: cn=TestUser,mail=TestUser@netscape.net modifytimestamp: 20020301185146Z cn: TestUser mail: TestUser@netscape.net xmozillausehtmlmail: FALSE objectclass: top objectclass: person and I also have a list with a member pointing to the above card: dn: cn=TestList cn: TestList objectclass: top objectclass: groupOfNames member: cn=TestUser,mail=TestUser@netscape.net then this memeber can't be added to the list because the card associated with the member can't be found. The reason is that in nsAddrDatabase::AddLdifListMember() we try to locate the card info associated with the list member using the LOWER CASE of the email address, and since the card was created with the non-modified email address (ie, no case conversion was done) we simply can't find the card. As a result, we return errors and the member is dropped from the list. So right now, only cards with lower case email addresses can be imported as members of a mailing list. I'll attach a sample ldif file for the problem next.
Ccing seth.
The email address in this file is "TestUser@netscape.net" (ie, not all in lower case).
cavin, can you attach the nsAddrDatabase.cpp fix for this, for completeness? This bug goes hand in hand with #121478, I claim they are going to end up being fixed by the same fix to addressbook.
Depends on: 121478
Attached patch Original patch of the problem. (obsolete) (deleted) — Splinter Review
This was the original patch for bug 62084.
The bug this was spawned off from (bug 62084) has: Pri.: P2, KW: nsbeta1+, TM: mozilla1.0. (it's probably "dataloss" too) Since mailing lists are just about as unusable as before (most users will have at least one capitalized email address), I suggest to copy over the above urgencies to this bug.
Reassigning. Seth, bounce it back to me if you prefer me looking into it.
Assignee: racham → sspitzer
Keywords: nsbeta1+
Priority: -- → P2
Target Milestone: --- → mozilla1.0
Taking from seth.
Assignee: sspitzer → cavin
nsAddrDatabase::GetRowFromAttribute() is where we locate the card of a given email address and the 5 callers are: 'aCaseInsensitive' ------------------ 1. nsAddrDatabase::AddListCardColumnsToRow() set to TRUE 2. nsAddrDatabase::AddLdifListMember() set to TRUE nsAddrDatabase::GetCardFromAttribute() (callers set value) | called by 3. nsAbAddressCollecter::CollectAddress() set to TRUE 4. nsMsgCompose::CheckAndPopulateRecipients() set to TRUE nsCAimABInfo::GetPersonalAbCardFromAttribute (callers set value) | called by 5. JS function AddExtraAddressProcessing() set to TRUE Fixing callers #2 and #3 does fix this bug and bug 121478 respectively. The other 3 calls should be changed as well so that for a given email address the associated card info can be located. This is mainly because when we created the card we used case sensitive (not case insensitive) email address. A patch is coming.
Attached patch Proposed patch on ns tree, v1 (obsolete) (deleted) — Splinter Review
Attached patch Proposed patch on mozilla tree, v1 (obsolete) (deleted) — Splinter Review
Comment on attachment 72812 [details] [diff] [review] Proposed patch on ns tree, v1 sr=sspitzer
Attachment #72812 - Flags: superreview+
Comment on attachment 72813 [details] [diff] [review] Proposed patch on mozilla tree, v1 sr=sspitzer
Attachment #72813 - Flags: superreview+
the patches look good. does this fix the scenario that ninoschka found (see her last attachment). one request: please put comments above all callers to indicate why we are now passing false (include this bug # in your comment.) we've basically decided that passing in false is "less-evil" than passing true. (both ways will have bugs)
Yes, the patch does fix Ninoschka's ldif import (with special chars) and I'll add your suggested comments to the calls. Good idea.
to be more specific, by switching from true to false, we will fix this bug (and #121478), but introduce a new bug. cavin, for your comment to the callers, can you say: "please don't change the 3rd param without reading bug #128535 and #121478" also, can you log bugs on the new bugs that this change will introduce?
Attached patch Proposed patch on ns tree, v2 (deleted) — Splinter Review
Added comments.
Attachment #72812 - Attachment is obsolete: true
Added comments.
Attachment #72813 - Attachment is obsolete: true
> also, can you log bugs on the new bugs that this change will introduce? > The new problem is logged in bug 129393.
Attachment #72151 - Attachment is obsolete: false
Comment on attachment 72884 [details] [diff] [review] Proposed patch on ns tree, v2 sr=sspitzer
Attachment #72884 - Flags: superreview+
Comment on attachment 72885 [details] [diff] [review] Proposed patch on mozilla tree, v2 sr=sspitzer
Attachment #72885 - Flags: superreview+
thanks for adding those comments and for logging the spin off bug.
Blocks: 129393
Removing dependency and have 121478 depend on this bug instead.
No longer depends on: 121478
Blocks: 121478
Comment on attachment 72884 [details] [diff] [review] Proposed patch on ns tree, v2 R=ducarroz
Attachment #72884 - Flags: review+
Comment on attachment 72885 [details] [diff] [review] Proposed patch on mozilla tree, v2 R=ducarroz
Attachment #72885 - Flags: review+
Comment on attachment 72885 [details] [diff] [review] Proposed patch on mozilla tree, v2 a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #72885 - Flags: approval+
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Trunk build 2002-03-22: WinMe, Linux RH 7.1, Mac 9.1 Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
To the best of my knowledge this bug still exists in the main code. To get it fixed please go to bug 129393 https://bugzilla.mozilla.org/show_bug.cgi?id=129393 and click the vote button to raise its level of importance.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: