Closed Bug 223404 Opened 21 years ago Closed 21 years ago

IMAP ACL checking is case sensitive

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: klteuscher, Assigned: Bienvenu)

Details

(Keywords: intl)

Attachments

(1 file, 1 obsolete file)

Using myrealbox.com, the imap server give me a username of kTeuscher.  In my
setup for both mozilla and thunderbird, I have my username set to kteuscher. 
Because of this, I receive the correct rights, but the icons for special folders
(inbox, trash, junk) aren't shown correctly.
The checking of user rights should use a case insensitive check, so that the
previously obtained rights can be found.

Patch upcoming.
Attached a patch to change all the usernames to lowercase for comparing in
nsMsgIMAPFolderACL::SetFolderRightsForUser and GetRightsStringForUser.

Kevin
Comment on attachment 133939 [details] [diff] [review]
Patch to change to case insensitive comparisons

Requesting a review and a suggestion for sr
Attachment #133939 - Flags: superreview?
Attachment #133939 - Flags: review?(bienvenu)
case-insesitivity is a bit more subtle. Your patch uses two different methods of
lower-casing. It should be all right as long as username stays within the ASCII
repertoire, but I'm not sure if that's the case with IMAP. 
Keywords: intl
Summary: IMAP ACL checking is case sensitive → IMAP ACL checking is case sensitive
Attached patch tweaked fixSplinter Review
Hi Kevin - I looked at your fix and the existing code was bugging me, so I
looked into it a little. The existing code was leaking memory because it was
never freeing the PL_strdup'ed string. So I replaced it with an nsCAutoString,
which allowed me to use the same ToLowerCase routine that you were using so
we'll definitely have consistent results, and fix the leak. Do you want to try
this patch?
Attachment #133939 - Attachment is obsolete: true
David:  I'll try it after the weekend.  I had thought about changing the
oldUsername so that I could use the same method, but I would have done it for
sure if I had caught on to that leak. 

jshin:  If I have interpreted rfc3501 correctly, I'm pretty sure that the userid
has to be 7-bit ASCII.  Also, David has now changed to use the same method for
both strings.

Kevin
Comment on attachment 133939 [details] [diff] [review]
Patch to change to case insensitive comparisons

remove requests
Attachment #133939 - Flags: superreview?
Attachment #133939 - Flags: review?(bienvenu)
David:  Your tweaked version worked for me.

Kevin
Comment on attachment 134044 [details] [diff] [review]
tweaked fix

Just a reminder; get whoever you want for a review
Attachment #134044 - Flags: review?(bienvenu)
fix checked in, sr=mscott
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Attachment #134044 - Flags: review?(bienvenu)
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: