svn: /web/php-bugs/trunk/www/ bug.php
| From: | Philip Olson | Date: | Sat, 13 Mar 2010 17:40:13 +0000 |
| Subject: | svn: /web/php-bugs/trunk/www/ bug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-7570@lists.php.net to get a copy of this message | ||
philip Sat, 13 Mar 2010 17:40:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=296151
Log:
Added a few missing is_spam() checks
Changed paths:
U web/php-bugs/trunk/www/bug.php
Modified: web/php-bugs/trunk/www/bug.php
===================================================================
--- web/php-bugs/trunk/www/bug.php 2010-03-13 17:33:37 UTC (rev 296150)
+++ web/php-bugs/trunk/www/bug.php 2010-03-13 17:40:13 UTC (rev 296151)
@@ -167,6 +167,11 @@
$errors[] = 'You must provide a comment.';
}
+ // primitive spam detection
+ if (is_spam($ncomment)) {
+ $errors[] = "Please do not SPAM our bug system.";
+ }
+
if (!$errors) {
do {
if (!$logged_in) {
@@ -193,6 +198,12 @@
}
} elseif (isset($_POST['ncomment']) && isset($_POST['preview'])
&& $edit == 3) {
$ncomment = trim($_POST['ncomment']);
+
+ // primitive spam detection
+ if (is_spam($ncomment)) {
+ $errors[] = "Please do not SPAM our bug system.";
+ }
+
$from = $_POST['in']['commentemail'];
} elseif (isset($_POST['in']) && !isset($_POST['preview']) &&
$edit == 2) {
@@ -263,6 +274,12 @@
} elseif (isset($_POST['in']) && isset($_POST['preview']) &&
$edit == 2) {
$ncomment = trim($_POST['ncomment']);
$from = $_POST['in']['commentemail'];
+
+ // primitive spam detection
+ if (is_spam($ncomment)) {
+ $errors[] = "Please do not SPAM our bug system.";
+ }
+
} elseif (isset($_POST['in']) && is_array($_POST['in']) &&
!isset($_POST['preview']) && $edit == 1) {
// Edits submitted by developer
if ($logged_in != 'developer') {