Closed Bug 20324 Opened 25 years ago Closed 16 years ago

need to munge .msf file names on a per-platform basis

Categories

(MailNews Core :: Backend, defect, P3)

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

Details

We need to munge msf file names for folders on a per-platform basis so that the msf file name is legal. 4.5 did this with _'s. <\......\> is an example of a bogus name that should be munged.
Status: NEW → ASSIGNED
Target Milestone: M14
Problematic NT characters: "/" "." ":" "\\" "~" "<" ">" "\"" NT filesystems are also case-independent, so uppercase characters need to be munged in order to disambiguate them from lowercase characters. The filenames "aux", "nul", etc. can be problematic, my server always puts a "=" character after every "/" in order to avoid this potential problem. You can probably make the munging be platform-independent, since platforms which don't need munging won't be hurt by it.
The "|" character is also problematic on NT.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fixed to replace illegal characters with '_'
QA Contact: lchiang → huang
David, could you provide more information..so I can verify this bug?
<\......\> is an example of a bogus name that should be munged. try creating an imap folder with that name, and see if you can open it.
Used 02-28-08-M15 Win32 commercial build: *Copy David's code for Win32 as following: #elif defined(XP_WIN32) nsCAutoString illegalChars = "\"/\\[]:;=,|?<>*$"; *The Test results are as following: 1)Created/opened folders & copied messages successfully on 5.0 were as following: "\" "[]" ":" ";" "=" "," "|" "<" "$" "\\" characters, uppercase characters and "aux", "nul" file names 2) Created folders unsuccessfully and displayed warning message "The current command did not succeed, the mail server responded: Invalid mailbox name" on 5.0 were as following: "/" "//" "?" "~" ">" "*" characters. 3) Created "." folder: "." folders displayed successfully on the 4.x & IMAP server but did not display on the 5.0. 4) List the IMAP servers folders' list as following: * LIST (\HasNoChildren) "/" $ * LIST (\HasNoChildren) "/" , * LIST (\HasNoChildren) "/" . --> server displayed "." folder but not on 5.0 * LIST (\HasNoChildren) "/" : * LIST (\HasNoChildren) "/" ; * LIST (\HasNoChildren) "/" < * LIST (\HasNoChildren) "/" = * LIST (\HasNoChildren) "/" [] * LIST (\HasNoChildren) "/" aux * LIST (\HasNoChildren) "/" nul * LIST (\HasNoChildren) "/" | * LIST (\HasNoChildren) "/" {1} \ * LIST (\HasNoChildren) "/" {2} \\ * LIST (\HasNoChildren) "/" {9} <\......\ --> see existing bug#22474 So, David, how do you think for above results?
I think you're rolling several bugs into one, but if that helps you keep track of things, that's fine. This bug is about munging the .msf file name on disk.
If above verification rolls several bugs, I will log those bugs separately.... But, I am not quite sure what the exactly I need to verify for this bug? Can you describe more? Thanks. I think I need to Cc: John for this bug since he mentioned many issues for this bug... Cc:jgmyers
You should be able to create ">" on Netscape Messaging Server. That should be filed as a separate bug. Netscape Messaging Server will allow you to create a folder containing "~" only if it is not the first character. So you should create "a~b" or somesuch.
Thanks for the response, I will log those bugs.
Bug#29581 & bug#29599 have been logged....
Logged other bug#29890 & bug#29926. Don't know whether I can mark as verified for this bug or not since bug#29599 ">" problem & bug#29926 "/" problem need to be solved in order to close this bug......adding depends bugs here!!
Depends on: 29599, 29926
Sorry, should be bug#29581 instead of bug#29599!! Changing depends from bug#29599 to bug#29581.
Depends on: 29581
No longer depends on: 29599
I put David's code here for including other platforms in case we may need to check other platforms: #if defined(XP_MAC) nsCAutoString illegalChars = ":"; #elif defined(XP_OS2) nsCAutoString illegalChars = "\"/\\[]:;=,|?<>*$. "; #elif defined(XP_WIN32) nsCAutoString illegalChars = "\"/\\[]:;=,|?<>*$";
*** Bug 14231 has been marked as a duplicate of this bug. ***
heads up, this code is getting tweaked. instead of replacing, I'll be hashing foldernames will "illegal chars". (note, foldernames that are too long for the OS's filesytem also get hashed, but the initial part of the name is preserved.) see #82821 this code got moved into nsMsgUtils.cpp, NS_MsgHashIfNecessary()
Hardware: PC → All
Depends on: 82821
Change the OS from WindowsNT to ALL. Adding bug 84004 for this bug's dependence. I will use this bug for the main bug to track .msf file names for all the platforms.... David, hope you don't mind that I am reopening this bug since there are some bugs existing (bug 29581 & bug 29926 for WinNT, bug 84004 for Mac) #if defined(XP_MAC) nsCAutoString illegalChars = ":"; John & David, Any idea about the illegalChars for Mac? Also, how about Linux platform? I need to investigate more from this bug and log other bugs per platform basis...
Status: RESOLVED → REOPENED
Depends on: 84004
OS: Windows NT → All
Resolution: FIXED → ---
Severity: normal → major
Target Milestone: M14 → ---
Oops! I mean bug 84008 for Mac
Depends on: 84008
No longer depends on: 84004
Product: MailNews → Core
I'm closing this bug - we can deal with the other issues separately, instead of making this bug into a tracking bug (since we already munge the .msf file names, and that's not the issue with the other bugs)
Status: REOPENED → RESOLVED
Closed: 25 years ago16 years ago
No longer depends on: 29581, 29926
Resolution: --- → WORKSFORME
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.