zopectl run doesn't allow arguments with embedded spaces

Bug #143814 reported by Paul Winkler
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

ZopeCtl.ZopeCmd.do_run() is passed an 'arg' argument which has been naively joined into one string. This seems to happen in main() in that file.

It means that you get unexpected results from a command like:

 bin/zopectl run myscript "a single argument?"

... because it will be treated as if you'd done this (quotes shown to make the point clear):

 bin/zopectl run myscript "a" "single" "argument?"

This probably also affects other zopectl commands that take optional arguments.

Tags: bug zope
Revision history for this message
Paul Winkler (slinkp) wrote :

Uploaded: startup.patch

Here's a patch against Zope2/Startup/zopectl.py. Works here, with some limitations: it won't handle embedded quotes in arguments and it currently only works with spaces, not arbitrary whitespace.

Also I think zdaemon has the same issue, which would affect zeoctl at least.

I checked Zope 2.10; it looks the same as 2.9.1.

Revision history for this message
Tres Seaver (tseaver) wrote :

This issue was addressed via a completely different implementation in Zope 2.12.0.

Changed in zope2:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.