Open Bug 550567 Opened 15 years ago Updated 15 years ago

xfeDoCommand wrong parses command line

Categories

(SeaMonkey :: General, defect)

SeaMonkey 2.0 Branch
defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: iav, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3 xfeDoCommand wrong parses command line. example: string seamonkey -remote "xfeDoCommand(composeMessage,subject='Any-any subject text',attachment='file:///c:/Temp/tempfile.html')" As result new mail composition window should be opened, with pre-filled subject "Any-any subject text", and attached file from file:///c:/Temp/tempfile.html In the real world no new mail window opens. When I remove all spaces prom string after "composeMessage", it start work ok. Then, parser if (/^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*([^\s]*)\s*\)\s*$/.test(remote)) { at http://mxr.mozilla.org/comm-central/source/suite/browser/nsBrowserContentHandler.js#288 wrongly parse remaining parameters, stopping on first whitespace (thanks :mcsmurf!). I think regexp there should be ^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*(.*)\s*\)\s*$ where ([^\s]*) replaced by (.*) for any parameters. Reproducible: Always
OS: Windows XP → All
Hardware: x86 → All
Blocks: 335550
Version: unspecified → SeaMonkey 2.0 Branch
See bug 499785 for a similar problem.
Yes, very similar. But think my regexp more correct - just not touch this part of strind, just pass to the handler.
(In reply to comment #0) > I think regexp there should be > ^\s*(\w+)\s*\(\s*([^\s,]+)\s*,?\s*(.*)\s*\)\s*$ This isn't quite right, because it will include spaces after the parameter.
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.