Closed Bug 95175 Opened 25 years ago Closed 24 years ago

Opening attachment changes it's name

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: baffoni, Assigned: mscott)

References

Details

Whenever I receive an Excel or Word file, and double-click on the attachment and choose "open attachment", it changes the name to a 8 random-charactar name, not the name of the attachment. saving the attachment to disk, then opening works fine.
WORKSFORME.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
From Reporter-- When you opened the word or excel files from bug 95619, did you see the file names change in the border title (and thus the default name of the save-as) of the document? If so, then we need to make sure you mark bug 95175 as still open. I see this bug occur on two separate machines (connecting to the same IMAP server and account) running Win2k with recent nightly builds.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Marking NEW.
Assignee: ducarroz → sspitzer
Status: UNCONFIRMED → NEW
Component: MIME → Mail Window Front End
Ever confirmed: true
reassigning to mscott
Assignee: sspitzer → mscott
*** Bug 104456 has been marked as a duplicate of this bug. ***
What is the etiquette for nominating this bug to be fixed before releasing 1.0? As a corporate user, this will severly hamper the ability to pass documents around to be edited by users (and then passed back). Especially if you can't send shortcuts to documents (which isn't always practical anyway).
*** Bug 107625 has been marked as a duplicate of this bug. ***
Propose upgrading this bug's severity to blocker, and adding the "data loss" keyword. The data that is lost in this bug is the filename. This bug can only be circumvented by the user by manually typing the filename back in.
Nominating for 0.9.8
Keywords: mozilla0.9.8
Keywords: mozilla1.0
The current behaviour appears to be a design choice - http://lxr.mozilla.org/mozilla/source/uriloader/exthandler/nsExternalHelperAppService.cpp#875 says "We need to generate a name for the temp file that we are going to be streaming data to. We don't want this name to be predictable for security reasons...". I assume that the author is concerned about the user's privacy, since the global /tmp directory is readable by anyone on a multiuser UNIX box. But this makes less sense on a single user Windows or Mac machine. Perhaps either whether filenames are randomised or the location of the temporary directory should be a user option.
If the reason for this is security, would it be a problem to stream the file with the correct filename, but to a randomly-generated subfolder? This would be a small performance hit, but how often do you download files so quickly that the overhead of generating a folder would be more than a blip to the user (and if it is a performance problem for multiple files, maybe you reuse the folder for a specified period of time)? Would this cause problems for temp cleanup (the reuse of folder might, but I don't think the one folder-per-file would)?
Suggestion: Mozilla should use a subdirectory of the system temporary directory for its temporary files (rather than the system temporary directory itself) and should create the subdirectory if it doesn't already exist. The subdirectory can be given the appropriate permissions so that only the user can list its contents - therefore guaranteeing the user's privacy. The subdirectory name could be based on the user's login id or process id so that it's guaranteed to be unique on a multi-user machine.
QA Contact: esther → trix
This was reported back in http://bugzilla.mozilla.org/show_bug.cgi?id=88056 and was marked invalid for security reasons (design). The actual bug report resulting in this change is http://bugzilla.mozilla.org/show_bug.cgi?id=58774
It may be by design, but it is an INELIGANT solution. Yes, it provides security, but it has unintended sideaffects. The reason for this security feature is because it is a known filename at a known path. So they chose to salt the name, and I say they should salt the path instead (at least for attachments "opened" in email as it isn't visible in other parts of Mozilla) - it will be just as secure but with fewer unintended side-effects. Either that or they should rename the file after it is finished copying to the temp directory but before it is launched (but they may consider that as defeating the security measure - I'm not quite sure what they are protecting against that can't be solved by appropriate file/folder permissions).
this was fixed a couple weeks ago by steve dagley. After we save it to the temp file we rename the temp file to match the right name.
Status: NEW → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
verified on mozilla & netscape 2002022703 builds
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.