Closed
Bug 22090
Opened 25 years ago
Closed 24 years ago
Can't send mac files to other users -- AppleDouble attachments not correctly encoded on send (or save)
Categories
(MailNews Core :: Backend, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.8
People
(Reporter: pmock, Assigned: bugzilla)
References
Details
(Whiteboard: [nsbeta1+] Fix in hand)
Attachments
(8 files)
146.00 KB,
application/octet-stream
|
Details | |
2.25 KB,
text/plain
|
Details | |
5.88 KB,
text/plain
|
Details | |
1.15 KB,
text/plain
|
Details | |
9.71 KB,
patch
|
Details | Diff | Splinter Review | |
7.16 KB,
patch
|
Details | Diff | Splinter Review | |
15.74 KB,
patch
|
Details | Diff | Splinter Review | |
10.42 KB,
patch
|
Details | Diff | Splinter Review |
Build Date & Platform Bug Found:
MacOS commercial seamonkey build 1999-12-17-10-m12 installed on G3/400 OS 8.6
Overview Description:
In Communicator 4.7, I sent a message with an attached a sample quicktime movie.
When I save the attachment, I no longer can open the file attachment in the
quicktime movie player. I open the message in Bbedit text editor and see that
the attachment was not decoded.
I will attach a sample quicktime attachment to this bug.
Steps to Reproduce:
1) In 4.7 Mac RTM, send a message to yourself with a small quicktime attachment.
I used a Rich text message
2) In 5.0, retrieve the mail message
3) Click on the paperclick icon in the message header and select the attachment
The save attachment dialog appears
4) Type in a name and save the attachment
5 [details]) Drag the file on top of the quicktime movie player
Error message appears.
Actual Results:
After saving the quicktime attachment, I drag the file on top of the movie
player application. I receive the error message "Couldn't open the file '...'
because the file is not a movie file".
If I view the contents of the save file, I see the following base 64 data:
--------------ad74AFCB70D2079C195F8C68F4
Content-Type: application/applefile
Content-Transfer-Encoding: base64
AAUWBwACAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAADAAAAVgAAAAwAAAAJAAAAYgAAACAAAAAI
....
....
Qm8AEkJvABBCbwAOIGsAGiBQMBBTQGcOU0BnEFNAZxIMU2FtcGxlIE1vdmlldGFsbC5zcmNp
--------------ad74AFCB70D2079C195F8C68F4
Content-Type: video/quicktime; name="Sample Movie"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="Sample Movie"
AAAI5G1vb3YAAAjcY21vdgAAAAxkY29temxpYgAACMhjbXZkAAAPa3ictVd7mBtVFT+T7
...
...
--------------ad74AFCB70D2079C195F8C68F4--
Expected Results:
I expect the quicktime movie attachment to be decoded in its native format.
Additional Builds and Platforms Tested On:
Additional Information:
Bug found while testing bug 2895
This problem does not occur with Microsoft Word documents created on the
macintosh.
Changing qa assigned to pmock@netscape.com
Updated•25 years ago
|
Assignee: rhp → jefft
Comment 4•25 years ago
|
||
You did "Save As..." didn't you? If not, just bounce it back.
- rhp
We probably don't know how to deal with applesingle/appledouble in 5.0. This
soulds like a M15 kind of tasks.
Rich,
The attachment Save As dialog on the Mac is entitled "Save". Jeff stop by and
found that Communicator 4.7 sent the attachment as apple single. If I send the
attachment from 5.0, then it encoded as base 64 and we decode it correctly.
Jeff thinks we may not support yet decoding apple single attachment.
Updated•25 years ago
|
Assignee: jefft → rhp
Status: ASSIGNED → NEW
Comment 8•25 years ago
|
||
Oh, ok...this makes sense. Thanks. I have code in the back end to deal with
appledouble files. Everything should be ok, except for one call that was a Mac
specific call that gave some info on files. I have to get that ported and I bet
this might work....maybe :-)
I'll take this one back.
- rhp
Updated•25 years ago
|
Status: NEW → ASSIGNED
Summary: Saving a quicktime attachment - does not decode from base64 → appledouble attachments not correctly encoded on send
Comment 9•25 years ago
|
||
I know what has to be done here...just have to get the time to do it.
- rhp
Comment 10•25 years ago
|
||
This should be a beta issue.
Summary: appledouble attachments not correctly encoded on send → [BETA1] AppleDouble attachments not correctly encoded on send
Comment 11•25 years ago
|
||
PDT thinks we'd give PDT+ to reading, but we'd ship beta1 without being able to
send appledouble
Whiteboard: [PDT-]
Updated•25 years ago
|
Summary: [BETA1] AppleDouble attachments not correctly encoded on send → AppleDouble attachments not correctly encoded on send
Comment 12•25 years ago
|
||
I really think this is important, but I was the only one before so I am moving
to M17.
- rhp
Target Milestone: M15 → M17
Updated•25 years ago
|
Target Milestone: M17 → M18
Updated•25 years ago
|
Keywords: correctness,
nsbeta3
Comment 13•25 years ago
|
||
Hi Steve,
Here is the bug for you to enjoy ;-)
- rhp
Assignee: rhp → sdagley
Status: ASSIGNED → NEW
Updated•25 years ago
|
Whiteboard: [nsbeta3+]
Target Milestone: M18 → M21
Comment 14•25 years ago
|
||
Adding plus and putting in M21 bucket for sustaining to help.
Thanks Steve!!
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 15•24 years ago
|
||
*** Bug 53120 has been marked as a duplicate of this bug. ***
Comment 16•24 years ago
|
||
Not holding PR3 for this; marking nsbeta3-. Adding rtm keyword since it's data
corruption
Keywords: rtm
Whiteboard: [nsbeta3+] → [nsbeta3-]
Comment 17•24 years ago
|
||
Steve, what's progress on this bug? The bar moves up every day and there's not
any kind of patch in the bug yet...
Assignee | ||
Comment 18•24 years ago
|
||
Rich, what do we still have to do? Can I help?
Comment 19•24 years ago
|
||
The modules to do the AppleDouble encoding are in the compose back end and
pretty well named. I got them pretty much ported into the new world order and
the code is actually in the back end for handling these files (its in ifdefs
since its pretty mac specific). My speed on Mac development is just hampered,
but I could help you out on what needs to be done.
- rhp
Comment 20•24 years ago
|
||
*** Bug 56294 has been marked as a duplicate of this bug. ***
Comment 21•24 years ago
|
||
saving these AppleDouble attachments also fail.
is this a dogfood issue for mac users?
Summary: AppleDouble attachments not correctly encoded on send → AppleDouble attachments not correctly encoded on send (or save)
Comment 22•24 years ago
|
||
Yes. I send Mac files by email, either to myself or others, several times per
week.
Comment 23•24 years ago
|
||
selmer talked to sdagley today - this won't get fixed, I think, for rtm.
Comment 24•24 years ago
|
||
In that case we need to relnote, and put in some kind of defensive dialog/silent
failure to avoid Mac users trying to send corrupted files all over the net.
Comment 25•24 years ago
|
||
Cool. Can we RelNote this and get it off the rtm radar?
Comment 26•24 years ago
|
||
triaging. not going to be done for rtm.
my apologies to the mac users.
Whiteboard: [nsbeta3-] → [nsbeta3-][rtm-]
Comment 27•24 years ago
|
||
Adding relnotertm keyword. Simon, did you open a new bug for any changes you
want in lieu of this fix?
Keywords: relnoteRTM
Comment 28•24 years ago
|
||
*** Bug 57348 has been marked as a duplicate of this bug. ***
Comment 29•24 years ago
|
||
I didn't open another bug. Do people think that some kind of warning dialog, or
silent refusal to attach, is justified?
Updated•24 years ago
|
Whiteboard: [nsbeta3-][rtm-] → [nsbeta3-][rtm-] relnote-user
Comment 30•24 years ago
|
||
Mozilla 0.9 this puppy. This is a dogfood issue for mac users.
Comment 31•24 years ago
|
||
not being able to send files to people is a fairly fundamental dogfood issue for
me, and most users, I would think.
why hasn't this gotten any attention? I have to go back to 4.x to send files to
people. Why should I ever then go back to ns6?
Severity: normal → critical
Summary: AppleDouble attachments not correctly encoded on send (or save) → Can't send mac files to other users -- AppleDouble attachments not correctly encoded on send (or save)
Whiteboard: [nsbeta3-][rtm-] relnote-user → [nsbeta3-] relnote-user
Comment 32•24 years ago
|
||
rtm-, just not making it without even a patch. UI freeze is past.
Jean-Francois, this was given to the wrong owner, are you interested in this one?
Assignee: sdagley → ducarroz
Status: ASSIGNED → NEW
Whiteboard: [nsbeta3-] relnote-user → [rtm-][nsbeta3-] relnote-user
Comment 35•24 years ago
|
||
samir told me that he's got some code that we may be able to use for this.
samir, comments?
Comment 36•24 years ago
|
||
changing milestone to unknown. It will get changed back when we figure out what
milestone to put this bug in.
Target Milestone: mozilla0.9 → ---
Comment 37•24 years ago
|
||
The AppleSingle encoder and decoder classes I mentioned live at:
mozilla/xpinstall/packager/mac/ASEncoder/src/nsAppleSingleEncoder.[h,cpp]
mozilla/xpinstall/src/nsAppleSingleDecoder.[h,cpp]
You can use these classes to encode a file if it has a resource fork (Boolean
nsAppleSingleEncoder::HasResourceFork(FSSpec *)) and decode a file if it is in
AppleSingle format (Boolean nsAppleSingleDecoder::IsAppleSingleFile(FSSepc *)).
You can pull the native FSSpec out of an nsILocalFileMac.
Comment 38•24 years ago
|
||
moving to mozilla0.8 and nsbeta1+
Updated•24 years ago
|
Keywords: mailtrack
Whiteboard: [rtm-][nsbeta1+] relnote-user → [nsbeta1+] relnote-user
Assignee | ||
Comment 40•24 years ago
|
||
Assignee | ||
Comment 41•24 years ago
|
||
Assignee | ||
Comment 42•24 years ago
|
||
Assignee | ||
Comment 43•24 years ago
|
||
Assignee | ||
Comment 44•24 years ago
|
||
Assignee | ||
Comment 45•24 years ago
|
||
Assignee | ||
Comment 46•24 years ago
|
||
Assignee | ||
Comment 47•24 years ago
|
||
The fix is about sending AppleDouble attachment from Macintosh
(mailnews/compose) and receiving Apple double attachment from any platform
(mailnews/mime, mailnews/mime/emitters and mailnews/base). The fix also include
some emitters' cleanup.
Keywords: relnoteRTM
Whiteboard: [nsbeta1+] relnote-user → [nsbeta1+] Fix in hand
Comment 48•24 years ago
|
||
it all look good to me, r=sspitzer
but I'd like a mac expert (like sfraser) to review it, since the bulk of the
code is all mac code.
nsISaveMsgListener is mac specific, but you've added it to all three builds,
even though the implementation is mostly stubbed out with XP_MAC. will
nsISaveMsgListener ever be extended to do stuff for the other platforms?
Having it on all three platforms does make the code cleaner, but will we pay for
it on win32 or linux at run time or at download time (bloat)?
one minor thing, use the stack based nsAutoString and not nsString in
nsMsgIsMacFile().
excellent work ducarroz, mac users must have been dying with out this.
Assignee | ||
Comment 49•24 years ago
|
||
nsISaveMsgListener is also used by other platform for the base class
(nsIStreamListener). This class use to be called nsSaveAsListener but didn't
have an IDL. I have added the IDL in order to have a clean access to it from
mime and have just added those 3 Mac specific functions.
Sure I will une an nsAutoString in nsMsgIsMacFile(). Thanks
Comment 50•24 years ago
|
||
shouldn't we be using an nsCOMPtr here?
nsISaveMsgListener *saveListener = nsnull;
+ outputListener->QueryInterface(NS_GET_IID(nsISaveMsgListener), (void
**)&saveListener);
+ if (saveListener)
+
looks like this is a ref-cnt leak here because saveListener is never released.
Assignee | ||
Comment 51•24 years ago
|
||
good catch. I have replaced this piece of code in both place it was used by:
nsCOMPtr<nsISaveMsgListener> saveListener = do_QueryInterface(outputListener);
if (saveListener)
{
...
}
Comment 52•24 years ago
|
||
Should nsMimeBaseEmitter::GetOutputListener
addref the return variable?
Comment 53•24 years ago
|
||
nsDecodeAppleFile.h
-------------------
Somewhat non-standard include guards (__nsDecodeAppleFile_h). The spec disallows
leading double underscores, I believe. Would prefer as nsDecodeAppleFile_h__.
Should avoid use of nsFileSpec in new code, preferring nsI(Local)File.
Should have a #pragma options align=reset after the applefile struct definitions.
nsDecodeAppleFile.cpp
---------------------
Bad tabbing in this file.
In ProcessAppleDoubleResourceFork::Write(), you assume that you'll get all the
AppleDouble headers in the first chunk. I don't think the order of entries
in the AppleSingle data is guaraneteed, so this seems fragile (esp. when you
may be decoding files sent by other mailers). What if a large resource
fork entry comes first?
Also, you may want to delay the PBSetCatInfoSync(&cipbr); with the file creator/
type
information until the file has been totally written to disk. You don't want
to have an application file lying around with only half of its resource
fork for any period of time.
nsISaveMsgListener.idl
----------------------
Where are the comments?
mimeeobj.cpp
------------
Why not just removed the commented out XP_MAC stuff?
mimei.cpp
---------
More bad tabbing here.
mimemoz2.cpp
------------
Leaking here:
+ nsIStreamListener *outputListener = nsnull;
+ msd->output_emitter->GetOutputListener(&outputListener);
and here:
+ nsISaveMsgListener *saveListener = nsnull;
+ outputListener->QueryInterface(NS_GET_IID(nsISaveMsgListener), (void **)&
saveListener);
(not sure that you fixed both).
mimemult.cpp
------------
More leaks:
+ nsIStreamListener *outputListener = nsnull;
+ msd->output_emitter->GetOutputListener(&outputListener);
and
+ nsISaveMsgListener *saveListener = nsnull;
+ outputListener->QueryInterface(NS_GET_IID(nsISaveMsgListener), (void *
*)&saveListener);
These lines:
+ nsIStreamListener *outputListener = nsnull;
+ msd->output_emitter->GetOutputListener(&outputListener);
+ if (outputListener)
+ {
+ nsISaveMsgListener *saveListener = nsnull;
+ outputListener->QueryInterface(NS_GET_IID(nsISaveMsgListener), (void *
*)&saveListener);
+ if (saveListener)
are better written as:
nsCOMPtr<nsIStreamListener> outputListener;
msd->output_emitter->GetOutputListener(getter_AddRefs(outputListener));
nsCOMPtr<nsISaveMsgListener>
saveListener(do_QueryInterface(outputListener));
if (saveListener)
Note that it's safe to pass null into a do_QueryInterface(), so no test is needed
for a non-null outputListener.
nsMimeBaseEmitter.cpp
---------------------
nsMimeBaseEmitter::GetOutputListener() should be a good XPCOM citizen and AddRef
its
out param.
nsMsgAppleDoubleEncode.cpp
--------------------------
+ nsString urlStr; urlStr.AssignWithConversion(aUrlString);
Slightly better to use an nsAutoString here.
+ char *ext = nsMsgGetExtensionFromFileURL(urlStr);
Is 'ext' allocated? Where is it freed?
It also seems that nsMsgIsMacFile() has some arbitrary number of file extensions
it considers as "non-mac" files, and everything else is a Mac file. I'm not sure
what calls this routine, but feel that it would be better to use the Internet
Config
service to tell us if the resource fork of a file is important, rather than
guessing
based on the file extension.
nsMsgAppleEncode.cpp
--------------------
Bad tabbing.
nsMsgAttachmentHandler.cpp
--------------------------
Bad tabbing
Use nsILocalFile rather than nsFileSpec.
nsMsgCompUtils.cpp
------------------
nsMsgGetLocalFileFromURL should return a nsILocalFile.
nsMessenger.cpp
---------------
Use nsILocalFiles, not nsIFileSpecs.
Why the totally empty nsSaveAttachmentListener ?
Assignee | ||
Comment 54•24 years ago
|
||
>Should nsMimeBaseEmitter::GetOutputListener
> addref the return variable?
I would say no because mime doesn't own the listener. In the function
nsMimeBaseEmitter::SetOutputListener, we already don't addref it. I just try to
stay consistent with the existing code. Anyway it's a tricky question.
Assignee | ||
Comment 55•24 years ago
|
||
I have changed my mind. GetOutputListener
will now addref the result and therefore I need to use an XPCOMPtr to avoid
leak when calling GetOutputListener
.
Assignee | ||
Comment 56•24 years ago
|
||
Appart nsFIleSpec, I have addressed all simon's points
Comment 57•24 years ago
|
||
r=sfraser with the changes jfd says he will do.
Comment 58•24 years ago
|
||
sr=bienvenu, with the changes I and sfraser suggested.
Assignee | ||
Comment 59•24 years ago
|
||
Fixed and checked in. I will file bug for stuff to cleanup.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 60•24 years ago
|
||
Is this fix related to bug 67553? If so, you need to back this out.
Assignee | ||
Comment 61•24 years ago
|
||
don't need to back it up as I already have a fix ready to be check in.
Comment 62•24 years ago
|
||
Cannot verify this bug until bug 67435 is fixed.
Comment 64•24 years ago
|
||
The fix that added AppleDouble support seems to have introduced a regression.
See bug 70222
Comment 65•24 years ago
|
||
Using build 2001-05-08 on mac and following the original scenario. I can save
shows video/quicktime: xmac-type="4D6F6F56"; x-mac-creator="54564F44"; name="
123.mov". Verified.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•