/    Sign up×
Community /Pin to ProfileBookmark

PHP mail processor security

Hi,

I’ve been this script (and others very similar) for some time now but my host has just suspended the site because of spam apparently. Can anyone see any obvious security issues with it?

Cheers

[upl-file uuid=0e421642-a3d6-4ed1-aa00-6d09f4307415 size=6kB]send_edit_check.txt[/upl-file]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@DJsACSep 08.2006 — opens link:

http:// yoursite.com/send_edit_check.php ?emailTo=[email protected] &emailSubject=Buy_Viagra &emailHeader=lotsofheaderinfo.

those aren't really checked.

Also if you open the page, with NO strings posted, as far as I can tell (read through quickly) it will still send a 'default' mail with:
[CODE]# Email to Form Owner

$emailTo = '"Owner Name" <[email protected]>';

$emailSubject = "Contact Form Submission";

$emailBody = "A form has just been submitted:n"
. "n"
. "Name: $FTGusern"
. "Email: $FTGemailn"
. "Telephone: $FTGtelephonen"
. "Address: $FTGaddressn"
. "Wedding: $FTGweddingn"
. "Commercial: $FTGcommercialn"
. "Lifestyle: $FTGlifestylen"
. "Brochure: $FTGbrochuren"
. "How Did You Hear About Us?: $FTGhown"
. "Message: $FTGmessagen"
. "n"
. "--n"
. "This is for information only:n"
. "" . date('Y-m-d H:i:s') . "n"
. "" . $_SERVER['REMOTE_ADDR'] . "n"
. "" . $_SERVER['HTTP_USER_AGENT'] . "n"
. "n"
. "";

$emailHeader = "From: [email protected]"
. "Reply-To: [email protected]"
. "MIME-Version: 1.0n"
. "Content-type: text/plain; charset="ISO-8859-1"n"
. "Content-transfer-encoding: quoted-printablen";

mail($emailTo, $emailSubject, $emailBody, $emailHeader);[/CODE]
×

Success!

Help @Matelot spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...