Exemple #1
0
    checkvc();
}
$db = new ThornPostDBI();
if ($db->checkban()) {
    THdie("PObanned");
}
$binfo = $db->getbinfo($db->getboardnumber($_POST['board']));
// Die if the board doesn't exist.
if ($binfo == null) {
    die("Specified board does not exist.");
}
//check for banned keywords
if ($mod == false) {
    // First, flood protection
    $longip = ip2long($_SERVER['REMOTE_ADDR']);
    if ($db->postedwithintime($longip) == true) {
        THdie("You must wait a while before making another post.");
    }
    // This should have the cached version of banned keywords in an array named $spamblacklist.
    @(include THpath . '/unlinked/blacklist.php');
    if (count($spamblacklist) > 0) {
        //The logic on this was entirely wrong.  If you want to filter out certain things, set up wordfilters.  This now (as of 12/16/12), stops the post.
        if (check_blacklist($_POST['body'], $spamblacklist)) {
            THdie("One of the phrases included in your post is not allowed.");
        }
        if (check_blacklist($_POST['link'], $spamblacklist)) {
            THdie("One of the phrases included in your post is not allowed.");
        }
        if (check_blacklist($_POST['nombre'], $spamblacklist)) {
            THdie("One of the phrases included in your post is not allowed.");
        }