In this node, I provided a patch for shellwords.pl. It seems that this program was silently untainting data. I submitted the patch to P5P, but in researching further, I discovered that Text::ParseWords had the same potential security hole. Further, it turns out that the CPAN.pm module uses this module. I attempted to contact the maintainer of Text::ParseWords with a patch, but it appears that pomeranz@netcom.com has disappeared into the aether. This is a core module, but I'm not sure that I should submit the patch to P5P.

What's the protocol for submitting a patch for a module that's not maintained? This seems a more significant issue since this module is part of the standard distribution. I've been trying to find information about this, but the P5P faq, CPAN, and PAUSE seem to have no information on this.

The patch, by the way:

--- ParseWords.pm.orig Tue May 21 12:51:06 2002 +++ ParseWords.pm Tue May 21 12:51:52 2002 @@ -50,6 +50,7 @@ sub parse_line { # We will be testing undef strings no warnings; + use re 'taint'; # if it's tainted, leave it as such my($delimiter, $keep, $line) = @_; my($quote, $quoted, $unquoted, $delim, $word, @pieces);

Cheers,
Ovid

I took the advice of lshatzer and submitted the patch to P5P (and found the author using cjf's recommendation). Jarkko Hietaniemi sent a notification that the patches will be in Perl 5.8.0. I'm in the core now :)

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to Patching an unmaintained module by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.