Closed Bug 301649 Opened 19 years ago Closed 19 years ago

Invalid local image filenames cause forwarded-inline messages to spin indefinitely on send.

Categories

(MailNews Core :: Composition, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: iannbugzilla)

References

Details

(Keywords: fixed1.8, regression)

Attachments

(2 files, 1 obsolete file)

Build ID: 2005-07-21-06, Windows XP SP2 SeaMonkey trunk.

Overview: When an HTML-formatted message contains and invalid filename (i.e.
non-existing), and this email message is forwarded inline, on send SeaMonkey
Mail spins indefinitely, 'Attaching filename.gif...'

Steps to Reproduce:

1. Load and select/view the attached .eml file in SeaMonkey Mail.
2. Choose Message -> Forward As -> Inline from the top-level menu.
3. Click Send.

Expected Results:

As in Thunderbird 0.9, I'd expect "There was a problem including the file
filename.gif in the message.  Would you like to continue sending the message
without this file?"

(OK) (Cancel)

Actual Results:

We spin saying "Attaching filename.gif..."

Additional Info:

We actually have code in place that is designed to prevent this.

http://lxr.mozilla.org/seamonkey/source/mail/locales/en-US/chrome/messenger/messengercompose/composeMsgs.properties#139

139 ## @name NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SAVING
140 12533=There was a problem including the file %.200s in the message. Would
you like to continue saving the message without this file?

See
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgAttachmentHandler.cpp#1062
Note that I actually meant to point to
NS_MSG_FAILURE_ON_OBJ_EMBED_WHILE_SENDING, not '..._SAVING'.
Flags: blocking-aviary1.5?
Keywords: regression
I was able to reproduce this and started debugging it - we're never getting an
OnStopRequest. I'll debug further.
the img src is valid, but we're still failing to attach it. My guess is that
we're blocking the url somewhere in the content policy stuff, but I'm not
hitting a few relevant breakpoints.
Assignee: nobody → bienvenu
ok, my new guess is that this is a temp file issue. That message has a bunch of
images that we're going to fetch. Each one is fetched to a temp file. I moved
the footer url to the top of the message (the one that was failing before), and
we were able to fetch that url fine, but some other image failed. Somehow we
might be colliding on temp files...I suspect this just because the temp file
code has changed recently.
I believe the problem is these img's <img alt="" src="scrisoare_files/s.gif"
height="5" width="1"> 

which don't look very valid. So the problem seems to be that we don't get the
OnStopRequest that these urls have failed.
do you get onStartRequest?
As we discovered in testing this, the following much-simpler testcase will also
trigger the same behavior, but may have a different cause:

1. In Mail compose, do an Insert | Image.
2. Under the Location tab, type any non-valid filename you want.
3. Click OK (ALT text isn't important here).
4. Click Send.

You'll see that we also spin here doing "Attaching ..."
Depends on: 303752
Summary: Invalid remote image filenames cause forwarded-inline messages to spin indefinitely on send. → Invalid local image filenames cause forwarded-inline messages to spin indefinitely on send.
Flags: blocking-aviary1.5? → blocking1.8b4?
I suspect the original case reported here is no longer an issue now that 303752
is fixed. But you could still see this using stephen's simpler steps by
attaching a file that doesn't exist to a new message. Plussing for now, but I
wouldn't hold the release for it if we don't get a fix.
Flags: blocking1.8b4? → blocking1.8b4+
The only remaining issue I see here is when you manually type in a file path
into editor's insert image dialog, we will spin on send. This is because that
dialog expects a file:// url and not a OS specific file path (like c:\temp\foo.png)

I suspect this dialog has always only worked with file urls.
(In reply to comment #9)
> The only remaining issue I see here is when you manually type in a file path
> into editor's insert image dialog, we will spin on send. This is because that
> dialog expects a file:// url and not a OS specific file path (like
c:\temp\foo.png)
> 
> I suspect this dialog has always only worked with file urls.

Scott, David: I've just verified that my original case works fine now--I can
forward inline that LaSalle Banking spoof message.

Builds: 2005-08-19-06 of SeaMonkey Mail trunk and version 1.6a1 (20050819) of
Thunderbird trunk.

Thanks so much for fixing that!
Attached patch FixupURI patch v2.0 (obsolete) — Splinter Review
This patch:
* Adds a FixupURI to ValidateImage so valid urls are generated
Attachment #193748 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #193748 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #193748 - Flags: superreview?(bienvenu)
Comment on attachment 193748 [details] [diff] [review]
FixupURI patch v2.0

if this file is used by editor/composer, we'll need moa, probably from
glazou...
Whiteboard: [needs SR bienvenu]
Attachment #193748 - Flags: review?(daniel)
Attachment #193748 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 193748 [details] [diff] [review]
FixupURI patch v2.0

Sorry, this patch is harmful. It is going to break img insertion relatively to
a document in Composer/Nvu.

1. Create a new doc and type some chars
2. save the document
3. insert an image from your hard disk (like c:\foo.png) making sure the
checkbox "URL is relative to page location" is checked
4. see the image is broken
5 look at the source and start screaming
Attachment #193748 - Flags: review?(daniel) → review-
Whiteboard: [needs SR bienvenu]
Changes since v2.0:
* Added check for make relative so fixup is not done if it is relative
Assignee: bienvenu → iann_bugzilla
Attachment #193748 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #194332 - Flags: review?(daniel)
Whiteboard: [needs review daniel]
Comment on attachment 194332 [details] [diff] [review]
Revised patch v2.1 (Checked in trunk and branch)

seems to be better.
r=daniel@glazman.org
Attachment #194332 - Flags: review?(daniel) → review+
Attachment #194332 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #194332 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #194332 - Flags: superreview?(bienvenu)
Attachment #194332 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 194332 [details] [diff] [review]
Revised patch v2.1 (Checked in trunk and branch)

Requesting approval for simple low risk regression-fix patch
Attachment #194332 - Flags: approval1.8b5?
Comment on attachment 194332 [details] [diff] [review]
Revised patch v2.1 (Checked in trunk and branch)

Checking in
EdImageOverlay.js;
new revision: 1.18; previous revision: 1.17
done
Attachment #194332 - Attachment description: Revised patch v2.1 → Revised patch v2.1 (Checked in trunk)
Please resolve the bug when it lands on the trunk so that we can get a trunk
verification before evaluating for the branch. Thanks
Whiteboard: [needs review daniel]
-> Fixed as per request by Asa
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Verified FIXED in version 1.6a1 (20050917) of Thunderbird trunk and SeaMonkey
1.1a:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050917
Mozilla/1.0
Status: RESOLVED → VERIFIED
Attachment #194332 - Flags: approval1.8b5? → approval1.8b5+
Comment on attachment 194332 [details] [diff] [review]
Revised patch v2.1 (Checked in trunk and branch)

Checking in (branch)
EdImageOverlay.js;
new revision: 1.17.18.1; previous revision: 1.17
done
Attachment #194332 - Attachment description: Revised patch v2.1 (Checked in trunk) → Revised patch v2.1 (Checked in trunk and branch)
Keywords: fixed1.8
Assuming that 319818 and 324110 (under discussion) are due to the same or similar bug(s) then the following applies to both.

Worikng with bugs 319818 and 324110 mxxxm@volny.cz shows that this bug or bug(s) first showed itself to the public after TB release ver 1.5 (20051201).   Looking at the Bugs FIxed for each release that are similar to the bug(s) above, one finds that the only bug listed as fixed or changed in this area is 301649 - the "spin indefinitely" part is especially relevant.

"TB ver 1.5  Bug 301649 'Fixed 8/30/05'
-------------------------------------------------------
301649: Invalid local image filenames cause forwarded-inline messages to spin indefinitely on send.

Bug 301649 Build ID: 2005-07-21-06, Windows XP SP2 SeaMonkey trunk.

Overview: When an HTML-formatted message contains and invalid filename (i.e.
non-existing), and this email message is forwarded inline, on send SeaMonkey
Mail spins indefinitely, 'Attaching filename.gif...'

Steps to Reproduce:

1. Load and select/view the attached .eml file in SeaMonkey Mail.
2. Choose Message -> Forward As -> Inline from the top-level menu.
3. Click Send.

Expected Results:
As in Thunderbird 0.9, I'd expect "There was a problem including the file
filename.gif in the message.  Would you like to continue sending the message
without this file?"
(OK) (Cancel)

Actual Results:
We spin saying "Attaching filename.gif...""

"Verified FIXED in version 1.6a1 (20050917) of Thunderbird trunk and SeaMonkey
1.1a:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050917
Mozilla/1.0"

The behavior of the system in the above bug is strikingly similar to that of the bugs under discussion.  The above bug either wasn't fixed,  wasn't completely fixed or had an underlying cause.  While investigating this problem I also discovered another Bug, 317970, with is also similar to the named bugs and which was thought to be a duplicate of Bug 324110.

"Bug 317970  Description:  [reply]  	 Opened: 2005-11-27 21:10 PDT
------------------------------------------------------------------------------------------------------
With SeaMonkey trunk CVS I was copmosing an email.  I have the "automatically
save every x minutes" pref enabled and when it tried to do so, it hung.  After
restarting, I pulled up the draft (saving seemed to be successful) and sent it
and I got another hang.  I was using a debug build and got this both times:

CopyListener::OnStartCopy()
nsMsgComposeSendListener::OnStartCopy()
CopyListener: SUCCESSFUL ON THE COPY OPERATION!
nsMsgComposeSendListener: Success on the message copy operation!
[hang]

------ Comment #16 From Adam Guthrie  2006-01-20 12:36 PDT  [reply] -------
*** Bug 324110 has been marked as a duplicate of this bug. ***"

I believe that there is a reasonable probability that bugs:
301649
317970
319818
324110
either are the same bug, manifestations of the same bug, or have a common root cause.  If they were solved earlier, they wouldn't be problems now.

It therefore seens reasonable that the four different bugs be combined into a single bug and their votes be likewise combined.

Respectfully submitted,
Charles Faulk, MD
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: