Closed Bug 316177 Opened 19 years ago Closed 19 years ago

command-line options for "-compose" broken

Categories

(Thunderbird :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird2.0

People

(Reporter: intendentedelleacque, Assigned: mscott)

References

Details

(4 keywords, Whiteboard: [qa:verified-tb-1802])

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.12) Gecko/20050920 Firefox/1.0.7
Build Identifier: Mozilla-Thunderbird version 1.5 Beta 1 (20050908)

It seems that in TB 1.5 the syntax of commands line described at http://www.mozilla.org/docs/command-line-args.html for the option "-compose" is broken. 

Reproducible: Always

Steps to Reproduce:
1. enter the command 
thunderbird -compose to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something else",attachment="file://path/to/file" 

Actual Results:  
With TB 1.5 you will have a message compose window, without any address in "to" and "cc" fields, any text in body and any attachment.

On the contrary, in TB 1.0.7 you will have a message compose window with to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something else",attachment="file://path/to/file" 



Expected Results:  
Also in TB 1.5 you should have  a message compose window with to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something else",attachment="file://path/to/file" 

A partial workaround is to use the command

thunderbird -compose "mailto:somebody@somewhere?cc=address@provider&subject=hi&body=Hell" 

But in this you can't pass any attachment, for the security restriction http://lxr.mozilla.org/mailnews/source/mailnews/compose/src/nsSmtpUrl.cpp#96
-> new
 using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051111 Thunderbird/1.5 ID:2005111106
Status: UNCONFIRMED → NEW
Ever confirmed: true
Same under Windows.  Not a problem with the compose window, it's a problem with parsing the command line.
Component: Message Compose Window → General
OS: Linux → All
Hardware: PC → All
Version: unspecified → 1.5
blockig1.8.0.1/blocking1.8.1?
Flags: blocking1.8.1?
Flags: blocking1.8.0.1?
Keywords: regression
Could this be related to the new command line hander stuff we added for 1.5 benjamin?
It sure could... I didn't realize that anything other than a mailto: URI was an acceptable argument for the -compose flag, so the code only handles that case:

http://lxr.mozilla.org/mozilla/source/mailnews/compose/src/nsMsgComposeService.cpp#1395
Flags: blocking1.8.0.1? → blocking1.8.0.1-
handle other cases such as "to","cc",ect.
See also bug 313457.
(In reply to comment #7)
> (From update of attachment 208061 [details] [diff] [review] [edit])
> Is
> <http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsSmtpUrl.cpp#96>
> an issue here?
> 

in 'mailto' syntax , you can't pass any attachment, for the security restriction.
just as the Description said.


(In reply to comment #8)
> See also bug 313457.
> 
what is the meaning?
#316177 depends on it?
Attachment #208061 - Flags: review?(benjamin)
(In reply to comment #10)
> (In reply to comment #8)
> > See also bug 313457.
> > 
> what is the meaning?
> #316177 depends on it?

Sorry, didn't mean to be cryptic.  No, I don't think this bug depends on or blocks that one, but the problem seen there is a similar regression in parsing the command line, where a file path is being treated as a URL.
Comment on attachment 208061 [details] [diff] [review]
handle other cases,not only "mailto:"

bah, this hack is spiraling out of control :-(
Attachment #208061 - Flags: review?(benjamin) → review+
I wasn't aware that we ever handled anything but a mailto url here. Interesting.
*** Bug 322011 has been marked as a duplicate of this bug. ***
*** Bug 323550 has been marked as a duplicate of this bug. ***
This bug broke the nautilus-actions[1] script I wrote for my parents that add a "Send to contact..." context menu item to all files, and either launches TB with a compose window or uses XRemote to invoke a new compose window in an already running instance.

Obviously, the XRemote part still works.

Anyone know how I can get this working again for 1.5?

1: <http://www.grumz.net/?q=taxonomy/term/2/9> <http://cvs.gnome.org/viewcvs/nautilus-actions/>
I'd like to re-request blocking1.8.0.2? but since blocking1.8.0.1 was turned down with no explanation, I guess it wouldn't do much.
blocking1.8.0.1- because there isn't a thunderbird release planned from 1.8.0.1
Flags: blocking1.8.0.2?
fixed on the trunk. Please verify there if you can. 
Attachment #208061 - Flags: branch-1.8.1?(mscott)
*** Bug 325371 has been marked as a duplicate of this bug. ***
Vidar, care to verify that this is working again on the trunk builds? 
(In reply to comment #21)
> Vidar, care to verify that this is working again on the trunk builds? 

I'll try to verify with <http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/thunderbird-1.6a1.en-US.linux-i686.tar.bz2>.
Attachment 209690 [details] works with todays nightly trunk build on Linux (20060201).
(In reply to comment #22)
> I'll try to verify with
> <http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/thunderbird-1.6a1.en-US.linux-i686.tar.bz2>.
> 
Thanks for Resolving this problem. Build from this link works as how it used to be with 1.0.7.

Unfortunately the win32 build (2006-02-01-06-mozilla1.8/thunderbird-1.5.en-US.win32.zip) is not working yet.

I appreciate your effort in resolving this bug. I have a 70+ installation which is yet to be upgraded, but avoided due to this bug.

Anticipating to see it being available in Thunderbird 1.5 (win32) branch.
Attached patch Supplementary fix (obsolete) — Splinter Review
There was a logic bug in the original code that could read past the end of the commandline array. I've committed this on trunk.
Attachment #210496 - Flags: branch-1.8.1?(mscott)
Attachment #210496 - Attachment is obsolete: true
Attachment #210498 - Flags: branch-1.8.1?(mscott)
Attachment #210496 - Flags: branch-1.8.1?(mscott)
(In reply to comment #24)
> (In reply to comment #22)

> Unfortunately the win32 build
> (2006-02-01-06-mozilla1.8/thunderbird-1.5.en-US.win32.zip) is not working yet.

No luck with the version at (http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tinderbox-builds/patrocles-mozilla1.8/thunderbird-1.5.en-US.win32.zip) or (http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2006-02-02-08-mozilla1.8/thunderbird-1.5.en-US.win32.zip).
Comment on attachment 208061 [details] [diff] [review]
handle other cases,not only "mailto:"

this has baked on the trunk long enough.
Attachment #208061 - Flags: branch-1.8.1?(mscott) → branch-1.8.1+
Attachment #210498 - Flags: branch-1.8.1?(mscott) → branch-1.8.1+
Status: NEW → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird2.0
Thanks for your efforts in resolving the bug.
A question: what means  "Target Milestone: Thunderbird2.0"?
Does it mean that the bug won't be fixed in 1.5.0.1 version of TB (if it will be released)?
Please kindly let us know whether the fix for this bug will be available in any release to come soon, if so what release will it be ?

Build at 
http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2006-02-06-15-mozilla1.8.0/thunderbird-1.5.0.1.en-US.win32.zip does not yet contain the fix.
(In reply to comment #30)
> Please kindly let us know whether the fix for this bug will be available in any
> release to come soon, if so what release will it be ?
> Build at 
>http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2006-02-06-15-mozilla1.8.0/thunderbird-1.5.0.1.en-US.win32.zip
> does not yet contain the fix.

You should find the fixed releases at http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/
(latest trunk of today is of  06-Feb-2006)

(In reply to comment #31)
> You should find the fixed releases at
> http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/
> (latest trunk of today is of  06-Feb-2006)
> 
Thanks, but it points to 1.6x branch, whereas I am interested in 1.5x branch. 

Well 1.6x releases are updated with the fix, which I noticed since 2006-02-02.
Attachment #208061 - Flags: approval1.8.0.2?
Attachment #210498 - Flags: approval1.8.0.2?
Attachment #208061 - Flags: approval1.8.0.2? → approval1.8.0.2+
Attachment #210498 - Flags: approval1.8.0.2? → approval1.8.0.2+
Keywords: fixed1.8.0.2
Flags: blocking1.8.0.2? → blocking1.8.0.2+
(In reply to comment #32)
> Thanks, but it points to 1.6x branch, whereas I am interested in 1.5x branch. 
> 
> Well 1.6x releases are updated with the fix, which I noticed since 2006-02-02.
> 
Thanks a lot guys.

Release 1.5.0.1 (20060208) from this link (http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2006-02-08-05-mozilla1.8.0/thunderbird-1.5.0.1.en-US.win32.zip) works well as it used to be with 1.0.7 as per '-compose' CLI option.

Could we expect 1.5.0.1 to be released soon ?
*** Bug 330021 has been marked as a duplicate of this bug. ***
verified with Thunderbird 1.5.0.2 20060308
Status: RESOLVED → VERIFIED
Whiteboard: [qa:verified-tb-1802]
verified fixed 1.8.1.3 using the steps to reproduce from comment#0 and Thunderbird 2 RC 2 (Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 ID:2007032620)
Keywords: verified1.8.1.3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: