You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2022/10/09 03:18:53 UTC

[Bug 8057] New: dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

            Bug ID: 8057
           Summary: dcc, pyzor, and extracttext plugins fail if there is a
                    space in the configured executable path
           Product: Spamassassin
           Version: 4.0.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Plugins
          Assignee: dev@spamassassin.apache.org
          Reporter: sidney@sidney.com
  Target Milestone: Undefined

As documented in bug 8027, sub helper_app_pipe_open in Utils.pm fails when the
path of the helper app contains a space. This sub is currently used in DCC,
Pyzor and ExtractText plugins.

The fix in bug 8027 skips tests in t/extracttext.t if a space is found.

This issue is being opened for the enhancement of allowing the code in
helper_app_pipe_open to work when the path has a space.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

Kevin A. McGrail <km...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@apache.org
   Target Milestone|Undefined                   |4.0.1

--- Comment #4 from Kevin A. McGrail <km...@apache.org> ---
Marking as a 4.0.1 target

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sidney@sidney.com

--- Comment #2 from Sidney Markowitz <si...@sidney.com> ---
(In reply to Loren Wilton from comment #1)
> Is it possible to put the executable name, including the path, in double
> quotes?

I tried that, and it doesn't work. The code creates a single command line
string that it passes to exec, which when passed a single string like that
splits it into  words by spaces before anything is passed to the shell. The fix
for this should not be difficult, but it will require a change in the code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

--- Comment #5 from Giovanni Bechis <gi...@paclan.it> ---
Created attachment 5917
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5917&action=edit
Possible fix

The attached diff make the tests work if the external program is written
between double quotes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

Loren Wilton <lw...@earthlink.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|lwilton@earthlink.net       |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

Loren Wilton <lw...@earthlink.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lwilton@earthlink.net

--- Comment #1 from Loren Wilton <lw...@earthlink.net> ---
Is it possible to put the executable name, including the path, in double
quotes?

At least from the Windows command shell "C:\My Path With Spaces\foo" (or
foo.exe) will work just fine.

The same quoting can be used on any parameter containing spaces.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |giovanni@paclan.it
             Status|NEW                         |RESOLVED

--- Comment #6 from Giovanni Bechis <gi...@paclan.it> ---
Sending        lib/Mail/SpamAssassin/Util.pm
Sending        t/extracttext.t
Transmitting file data ..done
Committing transaction...
Committed revision 1913611.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8057] dcc, pyzor, and extracttext plugins fail if there is a space in the configured executable path

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8057

--- Comment #3 from Mark Martinec <Ma...@ijs.si> ---
Created attachment 5841
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5841&action=edit
split-string-like-shell.pl

If someone wants to play with it and integrate into suitable places,
I'm contributing my implementation of a string-splitting function,
which strictly follows parsing rules of a Bourne shell (and bash, etc.).
Note that these rules have some traditional idiosyncrasies, as
documented in a comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.