Closed Bug 434110 Opened 16 years ago Closed 16 years ago

imap subscribe UI doesn't handle folders with a leading hierarchy delimiter

Categories

(MailNews Core :: Networking: IMAP, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

()

Details

Attachments

(1 file)

From the news posting pointed to by the above URL:

My IMAP server has the following mailboxes:

/users/ams/INBOX
/archives/example

The INBOX, and any other mailboxes under /users/ams, are accessible as
unqualified names (i.e. relative names like "foo"). Correspondingly, it
sends a NAMESPACE response like this:

S: * NAMESPACE (("" "/")) (("/users/" "/")) (("/" "/"))

Now, I start Thunderbird and set up an account; connect to the server,
and go to the "subscribe" menu item. There I see "archives", with a "+"
next to it, which I click, to reveal "example". I check the box next to
it, and click on "Subscribe".

As you can see from the attached session logs[1], Thunderbird then tries
to subscribe to "archives/example" (note: no leading /), though it has
been given no reason (via LSUB/LIST responses) to believe that such a
mailbox exists.
Attached patch proposed fixSplinter Review
this seems to fix it the problem for me - it shouldn't affect news, which doesn't have newsgroup names that start with hierarchy delimiters, and it rarely happens for imap. I'm still testing that other things still work with these folders, but subscribe seems fine.
Attachment #321341 - Flags: superreview?(dmose)
Attachment #321341 - Flags: review?(dmose)
Comment on attachment 321341 [details] [diff] [review]
proposed fix

Maybe Neil has time for this review - this only affects imap (newsgroup names don't start with a '.')
Attachment #321341 - Flags: superreview?(neil)
Attachment #321341 - Flags: superreview?(dmose)
Attachment #321341 - Flags: review?(neil)
Attachment #321341 - Flags: review?(dmose)
Comment on attachment 321341 [details] [diff] [review]
proposed fix

I take it we never list "/" itself do we?

The code seems somewhat unclear but I couldn't think of a better way.
Attachment #321341 - Flags: superreview?(neil)
Attachment #321341 - Flags: superreview+
Attachment #321341 - Flags: review?(neil)
Attachment #321341 - Flags: review+
No, listing "/" by itself would be meaningless.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: