Please do not put this script online. It will allow sending emails with arbitrary content to arbitrary recipients and thus be an open gate to spammers all over the world.

The cause for this is that the form parameters are not cleaned or validated in any way and thus $FORM{email} can contain newlines which will be passed on to your mailer verbatim. Also, the general code quality of this script is very low, so I'm not sure there aren't other problems with this code. If you are no Perl programmer and want to keep with this script, my best advice is to get somebody who is a Perl programmer to fix this script for you. The better approach is to use the Simple Search engine of the NMS Project. These are especially geared towards simple, stand-alone scripts.


In reply to Re: CGI search script: Exclusion list by Corion
in thread CGI search script: Exclusion list by Perlwannabe

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.