Open
Bug 538942
Opened 15 years ago
Updated 2 years ago
">" symbol in IMAP folder name causes error "NO: Unknown Mailbox to select" due to loss of ">"/>
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: ivanshirokoff, Unassigned)
References
(Blocks 3 open bugs)
Details
Attachments
(1 file)
1.78 MB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
I have IMAP folder named "BUG>TEST". When I'm selecting it with mouse an error message appears:
"Current operation wasn't executed. Mailserver response:[TRYCREATE] SELECT no such mailbox: BUG
." (this is my translation from english. I'm using the russian one)
If I create a folder named "BUG" I see it's contents when selecting "BUG>TEST".
I guess everything after > is just thrown away for some reason.
Reproducible: Always
Steps to Reproduce:
1. Create IMAP folder with ">" in its name
2. Select it
3. Error message appeares
Actual Results:
Error message
Expected Results:
Folder contents
Comment 1•15 years ago
|
||
Can you provide a imap:5 log as described at https://wiki.mozilla.org/MailNews:Logging and attach it to this bug ?
Updated•15 years ago
|
Component: Folder and Message Lists → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: folders-message-lists → networking.imap
Here's the log. Here I'm using folder called "<bugzilla>" at gmail.com. It was created with web interface. Still can't see its content.
Updated•15 years ago
|
Attachment #421093 -
Attachment mime type: application/octet-stream → text/plain
Comment 3•15 years ago
|
||
It seems imap is ok with the < and > signs. Is the culprit the OS when creating the file on disk ?
Which file?
Also I suffer from this problem at work PC too. Bouth of them are driven by Windows XP. Gug reproduces on GMail and mail.yandex.ru.
It seems to me that Thunderbird is the one to corrupt the data. Please see lines 309 and 20029 at enclosed log file.
Comment 5•15 years ago
|
||
our IMAP Urls use > as a separator between parts of the url; if we're not escaping the '>' in the folder name in imap urls, that would explain this issue.
Comment 7•15 years ago
|
||
> 7 lsub "" "*"
> * LSUB (\HasNoChildren) "/" "<bugzilla>"
>(snip)
> 9 select "<bugzilla"
> 9 NO Unknown Mailbox: <bugzilla (Failure)
Dup of bug 23789.
Updated•15 years ago
|
Summary: > symbol in folder name causes a problem → > symbol in IMAP folder name causes a problem (NO: Unknown Mailbox to select due to loss of ">", >)
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•15 years ago
|
||
Comment 9•15 years ago
|
||
(In reply to comment #8)
> Problem description of this bug is far better than bug 23789. Duping of bug
> 23789 to this bug is appropriate?
Yes absolutely.
Updated•15 years ago
|
Blocks: folders-with-special-characters
Comment 12•15 years ago
|
||
(Copy of bug 23789 Comment #9 by David :Bienvenu on 2000-07-26)
> The problem here is that '>' is the IMAP_URL_TOKEN_SEPARATOR, i.e.,
> it separates various parts of an imap url, so we get confused when parsing
> urls which contain folders with '>' in the name.
> This code also existed in 4.x, which is why 4.x has the same problem.
> I'm not sure how to fix this in a safe way.
> Obviously, escaping the '>' in the folder name somehow could do it,
> or "quoting" the folder name, but this could require lots of changes.
Comment 13•15 years ago
|
||
RFC 3501 defines; ( http://tools.ietf.org/html/rfc3501#section-9 )
mailbox = "INBOX" / astring
astring = 1*ASTRING-CHAR / string
ASTRING-CHAR = ATOM-CHAR / resp-specials
ATOM-CHAR = <any CHAR except atom-specials>
atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards /
quoted-specials / resp-specials
list-wildcards = "%" / "*"
quoted-specials = DQUOTE / "\"
resp-specials = "]"
string = quoted / literal
quoted = DQUOTE *QUOTED-CHAR DQUOTE
QUOTED-CHAR = <any TEXT-CHAR except quoted-specials> /
"\" quoted-specials
literal = "{" number "}" CRLF *CHAR8
; Number represents the number of CHAR8s
According to RFC 3501, { in maibox can appear as next only.
(a) "...{..." (mailbox as string, quoted)
(b) {number} (mailbox as string, literal)
How about using { as IMAP_URL_TOKEN_SEPARATOR instead of > ?
For (a): I think " in mailbox name is probably avoided.
For (b): Even if problem due to { in folder name occurs, if mbox name is not format of {number}, it can be said as RFC3501 violation by IMAP server. So, as far as escaping of mailbox name of {number} or rejection of creation is done by Tb upon IMAP folder creation request, RFC violation by Tb is avoided. And, Tb can rquest user not to use { in mailbox name accoding to RFC 3501, unless mailbox name is {number}.
I think it's far better than current RFC violation by Tb with >, even though it's merely changing of "> problem" to "{ problem".
Can * or \ or HTAB or VTAB etc. be used as IMAP_URL_TOKEN_SEPARATOR instead of > ? Will it produce problem at many problems in modules which manupilates URL format path?
Comment 14•15 years ago
|
||
There's a function CreateEscapedMailboxName() in nsImapProtocol.cpp.
It just replaces \ with \\ and " with \", maybe we need to replace > with %3E as well.
Summary: > symbol in IMAP folder name causes a problem (NO: Unknown Mailbox to select due to loss of ">", >) → ">" symbol in IMAP folder name causes a problem (NO: Unknown Mailbox to select due to loss of ">", >)
Updated•15 years ago
|
Summary: ">" symbol in IMAP folder name causes a problem (NO: Unknown Mailbox to select due to loss of ">", >) → ">" symbol in IMAP folder name causes error "NO: Unknown Mailbox to select" due to loss of ">"/>
Comment 15•9 years ago
|
||
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•