嘿,伙计们,今天我访问了我的网站,我看到有人在我的故事表中插入超过1000查询防垃圾邮件
我的脚本是在PHP/MySQL和我已经启用了验证码,我不知道他怎么能做这样的事情
一个简单的表格,并在另一个函数,它检查$ VAR和验证它们,然后在数据库中插入
我敢肯定,他是用一个机器人做这样的事情
IM真的困惑
这是我的功能验证,并插入到表
function submitStory($name, $address, $subject, $story, $storyext, $topic, $alanguage,$tags) {
$subject = check_words(check_html(addslashes($subject), "nohtml"));
$story = check_words(addslashes($story), "nohtml");
$storyext = check_words(addslashes($storyext), "nohtml");
$result = $db->sql_query("INSERT INTO ".$prefix."_stories
(sid,catid,aid,title,time,hometext,bodytext,newsref,newsreflink,comments,counter,topic,informant,notes,ihome,alanguage,acomm,hotnews,haspoll,pollID,associated,tags,approved,section)
VALUES
(NULL, '$catid', '', '$subject', now(), '$story', '$storyext', '','', '0', '0', '$topic', '$name', '', '', '$alanguage', '', '', '0', '0', '','$tag_ids','2','news')");
mysql_error();
include ('header.php');
echo "<font class=\"content\"><b>"._THANKSSUB."</b><br><br>"
.""._SUBTEXT.""
."<br>"._WEHAVESUB." $waiting "._WAITING."";
include ('footer.php');
}
您有一个SQL注入漏洞。 您需要使用参数。 – SLaks 2010-03-01 18:27:17
@Mac:供参考:http://www.php.net/manual/en/pdo.prepared-statements.php。关于使用PDO的教程,包括准备好的语句:http://www.kitebird.com/articles/php-pdo.html – outis 2010-03-01 18:53:30
您确实在检查验证码是否有效? – jasonbar 2010-03-01 19:20:41