I downvoted this because it scares me.

First, you are allowing people to randomly send me anonymous messages without getting my prior permission. That IS SPAM, in spite of your insistence to the contrary. (Most spam claims not to be. {sigh})

Second, you aren't checking the contents of $form{email}, so I could inject something with newlines and control the entire header. Sure, your header and message would appear far later down in the tail of the body, but by then, the person is already reading my Penis Extension or Nigerian Request, and clicking here and there to buy my crap.

Third, sending email from CGI is the wrong way to go. If you have a mailing problem, the solution is almost certainly not CGI. CGI is meant for a reply through HTTP, not for a mailing action as a side-effect.

As I said, this post scares me. Please, you need design help and security help. Maybe even ethical help. Not just Perl help.

-- Randal L. Schwartz, Perl hacker


In reply to •Security and design problems - beware by merlyn
in thread Redirecting Problem by venimfrogtongue

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.