Closed Bug 140212 Opened 23 years ago Closed 17 years ago

Mail folder with slash (/) in name causes strange results (usual local folder, not search/virtual folder), not IMAP

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kerry, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I created a mail folder named "Kinda Funny/Quotes". I wasn't sure if a slash was acceptable or not, but I got no warning of the name being invalid, and it seemed to work. I dragged one e-mail message into this folder before quitting. I ended up having problems which appear to boil down to the slash having been treated partly as a valid folder name character, but partly as path separator. The next time I went to look at my mail, I had a folder simply called "Kinda Funny", with an expansion widget next to it. I clicked the widget, and inside there was a folder named "Quotes". It was only by clicking on the inner folder that I could see the message I'd dragged in earlier. I tried to move the message out of the inner folder into the outer folder -- that didn't work. I tried to drag the message into my Inbox -- that didn't work either. I was, however, able to drag the the inner Quotes folder into the Trash. Once in the Trash, I was able to drag the saved message out and into the safety of my Inbox. I then threw away the Kinda Funny folder, and tried to create a new one with the same name, "Kinda Funny". I was told that there was already a folder with that name. I closed my e-mail window and re-opened it, and indeed the once deleted folder had reappeared. I decided then to quit Mozilla, dig down into ~/Library/Mozilla/.../mail.myisp.com. and manually delete the unwanted mailbox -- which, not too surprisingly, turned out to be a folder (meaning a file system directory) rather than a mailbox, with a Quotes mailbox inside. It looks like a bug where the either the slash shouldn't have been allowed in the mail folder name in the first place, or where care has to be taken not to completely literally use folder names as file names when some of the characters in the folder name, such as a slash, might not be legal file name characters.
-> Mail
Assignee: Matti → sspitzer
Component: Browser-General → Mail Window Front End
Product: Browser → MailNews
QA Contact: imajes-qa → olgam
QA Contact: olgam → sheelar
Whiteboard: DUPEME
Using Windows XP build 2002062109 When I try to create a mail folder with a slash in it, nothing happens when I press the OK button in the new folder dialog. It clearly stops me from creating the folder, but it doesn't tell my why. As soon as I remove the slash, the folder is created when pressing OK. The same occurs with backslash. In other words, I didn't get the same results as the reported. Expected results: It should display a warning saying something like "A folder name cannot contain any of the following characters: [list of invalid chars]" Suggest rename of summary to "Creating mail folder with slash/backslash in name causes OK button to do nothing" Maybe that's another bug than this one?
Kerry, please provide the Build ID you're reporting against, as well as simplified steps to reproduce the problem. Thanks.
I simply right-clicked on my mail account, selected "New Folder...", and typed in the folder name "Kinda Funny/Quotes" as described in the original bug report. I suspect that since '/' is the path separator character in Mac OS X, but not in Windows, that the behavior when testing this bug in Windows will be different than with OS X. Perhaps trying to use a '\' in Windows will bring about a similar result. As for the build number when I first reported the bug: it was pre-RC 1, but I don't recall now the exact build. In the build I'm currently using, 2002052918, the same bug still exists. Oddly, if I have an existing mail folder called "foo", and I try to create a new folder named "foo/bar", I'm not allowed to do that. There's no clear error message, it's just a matter of clicking "OK" being ignored when I try to enter the folder name. I'd guess that at some level the first part of new name before the slash is being detected as the same as an existing folder, causing the entire new name to be rejected. Even without having examined the guts of the related code, to me this bug is not in the least bit mysterious. The slash character '/' simply can't be part of an OS X (or any Unix) file or directory name. Creating new mail boxes and mail folders causes same-named files and directories to be created. If nothing is done to exclude illegal file name characters from mail box and mail folder names, and nothing is done to escape or otherwise encode such characters before literally including them in file/folder names... something is going to break.
Confirming -- this also happened to me the other day, exactly as the reporter describes. (Mozilla 1.1b for Mac OS X, 2002072203.) When the user asks Mozilla to create a folder named `foo/bar', the actual result is a subhierarchy: Local Folders foo foo.sbd bar (and later foo.msf and bar.msf). The expected result is that Mozilla should either refuse that name (as in XP, comment 2); or it should behave like the OS X Finder, i.e., create a folder named `foo:bar' in the filesystem, but still display its name as `foo/bar' in the GUI.
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 169642 has been marked as a duplicate of this bug. ***
*** Bug 170038 has been marked as a duplicate of this bug. ***
*** Bug 170299 has been marked as a duplicate of this bug. ***
QA Contact: sheelar → esther
Linux/Windows build freezes if you create a folder with "/".
Severity: normal → critical
OS: MacOS X → All
Hardware: Macintosh → All
*** Bug 168595 has been marked as a duplicate of this bug. ***
Fix for bug 117385 has improved treatment of illegal characters in folder name and the fix is already applied on tested build. 0x5C(\,real filename will be "00000072.msf") and 0x7C(|,real filename will be "00000092.msf") cases were resolved by this fix on MS Windows environment. But problem of bug 140212 still remains even on MS Windows system. [Environment] 2002111508-trunc/Win-Me [Test Procedure and Result] (1) Create a folder named "TEST" -> "TEST", "TEST.msf" were created (2) Create a folder "/"(0x2F) under "TEST" folder -> Mozilla freezed(CPU 100%,probably loop) -> "TEST.sbd" was created. Under TEST.sbd, "00000045" was created. But I could not find "00000045.msf" file. (3) Kill Mozilla (4) Restart Mozilla -> Folder name of "TEST" was changed to "/" (Real file names are "TEST","TEST.msf","TEST.sbd" on file system) -> Under new "/" folder, folder named "00000045" apeared. (This is normal because "00000045" file exists under "TEST.sbd" directory) Folder named "/" could not be moved, deleted nor renamed. To clear, delete "TEST","TEST.msf","TEST.sbd" files/directory and restart Mozilla. Special care will be required for "/" since this is path separator in URI too.
*** Bug 181282 has been marked as a duplicate of this bug. ***
*** Bug 160441 has been marked as a duplicate of this bug. ***
*** Bug 181772 has been marked as a duplicate of this bug. ***
Whiteboard: DUPEME
*** Bug 187436 has been marked as a duplicate of this bug. ***
I noticed another character that does funny things with folders. I used the "#" character in a foldername and all the messages in that folder went blank (the preview-window did not change view and if I opened a mail it was blank). When I tried to rename it again an alert said: "The folder culd not be renamed. Perhaps the folder is being reparsed, or the new name is not a valid foldername." I got this when I renamed it from "test#test" to "test". After that, the emails in that folder was not visible with Mozilla. I got them back by renaming the folder-files and restarting Mozilla. Version: Mozilla 1.3b, Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210
Jonas, "#" related problem is handled by Bug 94124. Bug 124287 (Meta bug: Problems with folders having names with illegal characters) will help you. In addition to above illegal character cases, rename related problem( Bug 65303 ) is reported even for legal folder names.
*** Bug 203491 has been marked as a duplicate of this bug. ***
Still the case in 1.4a when importing outlook express folders
*** Bug 205822 has been marked as a duplicate of this bug. ***
*** Bug 205829 has been marked as a duplicate of this bug. ***
*** Bug 209763 has been marked as a duplicate of this bug. ***
*** Bug 210412 has been marked as a duplicate of this bug. ***
*** Bug 211836 has been marked as a duplicate of this bug. ***
Recent Linux trunk build cannot create mail folder with /, but WinMe can. Is the bug morphing?
how about changing summary to reflect that it's not just /, but also many other characters, if those character cause problems, they should at least not be allowed to be used in a folder name. also, IMO this bug is a blocker, it stops me from working in Mail/Tb, side effect include messages dissapearing/reappearing from folders, inablility to delete folders, not even having the ability to rename a folder back using legal characters.
*** Bug 223262 has been marked as a duplicate of this bug. ***
Actual Version Mozilla 1.6 stable, german localization, Windows 2000 on PC, Same behavior as described in Comment #16 with " / " in the name.
I renamed a folder with a "/" by mistake and it took the name fine. I am not able to get into the folder or delete it. If I try to rename it again I get the message saying thtat the folder can not be renamed. I can read the file with notepad ( it was renamed to some cryptic name, but I can not do anything with it in Mozilla.
Yea, that is the worst part of this bug. So, you're not the only one here.
*** Bug 89986 has been marked as a duplicate of this bug. ***
Does this allow me to add to the bug? If it does: * I was able to rename an existing mail folder with a slash in the name. * This deleted the mail folder * I could not then rename the folder back. Mozilla 1.6 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113
Attached patch patch v0Splinter Review
Comment on attachment 149892 [details] [diff] [review] patch v0 Can you give r? Thanks
Attachment #149892 - Flags: review?(sspitzer)
I noticed in my case where I renamed a folder using a "/" that it took it and appeared to rename the folder but the operation never completed. The UI displayed the folder name but the read/unread counts went to "???" and nothing displayed when the folder was selected. I noticed on disk that the folder had been renamed to "5ba0f997" and appeared to still be there. I exited mail, renamed the folder and .msf and then restarted and recovered the contents of the folder. Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
*** Bug 254286 has been marked as a duplicate of this bug. ***
*** Bug 258067 has been marked as a duplicate of this bug. ***
A related problem with folders with slashes in the name: Trying to drag and drop another folder into one with a slash in the name does not work. There is no feedback to the user... it just doesn't do it. Steps: 1. Create a folder "a / b" 2. Drag another folder "c" into "a / b" 3. The mouse icon changes as though this will be allowed 4. Release the mouse button 5. Nothing happens Thunderbird 0.7.3 on Windows XP. IMO the proper fix for these bugs is not to restrict the characters the user can use when naming folders. It would be very inconvenient not to be able to use all restricted characters from all platform Thunderbird supports. To put it another way, the user's ability to name folders should not be dependant on the file naming rules of the operating system / filesystem.
I recently experienced this problem with Mozilla's Mail program (1.7.3) when I named a folder with a / in it and found that it would create the files to keep track of the folders but sometimes would show them in the folders and have had mixed results in deleting the badly created folders, sometimes getting a read/write error.
Folder of "/" could be created and used with no errors by both Mozilla Suite latest-trunk(1.8a5) and Thunderbird 0.9(and latest nightly) on Win-2K. ( file set of "HEXA-string" and "HEXA-string.msf" was created ) Mscott has successfuly resolved this lo---nglived bug, I believe, by fix for Bug 219586 and Bug 264467, post fix of Bug 264071 is required though.
Product: Browser → Seamonkey
See also Bug 245905 for Thunderbird-specific issues. "/" in the foldername causes no problems for Thunderbird 1.0, but unexpectedly creates a folder with a subfolder in it ("a/b" => new Folder "a" with new subfolder "b").
Assignee: sspitzer → mail
*** Bug 294367 has been marked as a duplicate of this bug. ***
(In reply to comment #42) > but unexpectedly creates a folder with a subfolder in it > ("a/b" => new Folder "a" with new subfolder "b"). When usual local mail folder, Thunderbird latest-trunk(Win-2K) created file of "72130ad9" and "72130ad9.msf" and directry of "72130ad9.sbd" for folder name of "a/b" ("a/b" is kept in "72130ad9.msf" only.) And message filter points it thru "mailbox://aaa@xxx.yyy.zzz/Test/72130ad9". This indicates no possibility of creation of directry/file of "a" or "b", if only usual local mail folders are involved. Is you problem when "Virtual folder"("Saved search folder") is involved? If yes, virtualFolder.dat contains string of "a/b" in path of the virtual folder, then problem of Bug 286523 may occur. Your problem is Bug 286523, isn't it.
I have the same problem with slash ("/") on folder names. I'm using the version 2.0.0.0 (20070326) and the problem still happening. I can't create a folder with name "until 01/04/2007". The program creates a subfolder on each "/".
(In reply to comment #45) > The program creates a subfolder on each "/". Same problem as which comment? Isn't it search folder(virtual folder)? This bug is for usual local folder, and already resolved, but is kept open because WORKSFORME cannot be applied and it's still unclear which patch/bug had resolved. (No one can close this bug except developer who resolved this bug's problem.) As I wrote in Comment #44, different Bug 286523 occurs when search folder(virtual folder), and "subfolder(and/or directory) on each /" is phenomenon of Bug 286523.
Summary: Mail folder with slash (/) in name causes strange results → Mail folder with slash (/) in name causes strange results (usual local folder, not search/virtual folder)
Sorry. My reply is not related to Comment #46. It's related to the first comment... Kerry Shetline 2002-04-25 20:03:00 PDT. I can't create folders with "/" in the name, like "messages 01/01/2007". The program creates 3 folders. "message 01" than "01" and than "2007". I'm using version 2.0.0.0 (20070326)on Windows.
(In reply to comment #47) > I can't create folders with "/" in the name, like "messages 01/01/2007". > The program creates 3 folders. "message 01" than "01" and than "2007". > I'm using version 2.0.0.0 (20070326)on Windows. To Eduardo Brasil (comment poster of comment #45 & comment #47) : Could you please describe exact/detailed operations you did when you encountered your problem (or you re-create your problem), with description about directory/file status for mail folder (what file/directory is created, renamed or deleted) before&after each step. (like Bug 286523 comment #1)
(In reply to comment #48) > Could you please describe exact/detailed operations you did when you > encountered your problem (or you re-create your problem), with description > about directory/file status for mail folder (what file/directory is created, > renamed or deleted) before&after each step. (like Bug 286523 comment #1) WADA, this can be easily reproduced on an IMAP server. I tried with Local Folders or POP3 were it is working like expected. But if you create a folder like '2007/04/25' as a new root folder or as a subfolder of any existing folder you get following tree: [x] 'existing folder' [x] 2007 [x] 04 25 If we need an IMAP log I could create one.
(In reply to comment #49) > this can be easily reproduced on an IMAP server. To Henrik Skupin : Oh, IMAP case... You don't seem to understand why I added "usual *LOCAL* folder" in summary and comment #44, but I say sorry to you for my lack of attention on IMAP cases. (I always forget IMAP case because I don't/can't use IMAP, and I don't know about IMAP well...) Please see dependency tree of Meta Bug 124287, and see at least Bug 29926 for "/" related issue(s) when IMAP. When IMAP, some use "/" as delimiter of folder hierarchy but some use "."... To Eduardo Brasil (comment poster of comment #45 & comment #47) : Is your problem when IMAP?
Summary: Mail folder with slash (/) in name causes strange results (usual local folder, not search/virtual folder) → Mail folder with slash (/) in name causes strange results (usual local folder, not search/virtual folder), not IMAP
(In reply to comment #50) Yes, I tested now. It's only on IMAP servers. Could be a problem of my IMAP server? Follow my steps to get the problem: I open thunderbird (version 2.0.0.0 (20070326) running on Windows XP SP2) and get my e-mail messages. I don't use the local folder to store my messages. I have one disk folder to each mail account. I right click on Inbox(of IMAP account) then I click on "New Folder" and type something like "10/01/2007" as folder name. Then I click OK e thunderbird creates three folders. The first with name "10", under "10" a new folder called "01" and under this last folder, another with name "2007". I follow the same steps on Local Folder (POP3) and works fine. No problems. > (In reply to comment #49) > > this can be easily reproduced on an IMAP server. > > To Henrik Skupin : > > Oh, IMAP case... > You don't seem to understand why I added "usual *LOCAL* folder" in summary and > comment #44, but I say sorry to you for my lack of attention on IMAP cases. > (I always forget IMAP case because I don't/can't use IMAP, and I don't know > about IMAP well...) > > Please see dependency tree of Meta Bug 124287, and see at least Bug 29926 for > "/" related issue(s) when IMAP. > When IMAP, some use "/" as delimiter of folder hierarchy but some use "."... > > To Eduardo Brasil (comment poster of comment #45 & comment #47) : > Is your problem when IMAP? >
(In reply to comment #51) > Yes, I tested now. It's only on IMAP servers. Could be a problem of my IMAP > server? You can test this with another mail client which is capable to use IMAP. I tested with Outlook and it works fine. But we should stop here and move over to bug 29926.
Changing to FIXED (already worksforme because fixed by some other bugs)
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Is this really finaly fixed? - Thank you all, this was sooooo an anoying and dangerous bug. Im really happy :) Thank you all!!!
(In reply to comment #54) > Im really happy :) Thank you all!!! This comment made me happy too! :)
Comment on attachment 149892 [details] [diff] [review] patch v0 This looks to be an obsolete patch on a bug now marked as fixed (by other bugs). Therefore clearing request. If it is still required, please refile on a new bug.
Attachment #149892 - Flags: review?(sspitzer)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: