[geeklog-cvs] geeklog-1.3/public_html submit.php,1.80,1.81
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Sat Jan 22 13:14:44 EST 2005
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv6074
Modified Files:
submit.php
Log Message:
Added spam checks for the story, event, and link submissions.
Index: submit.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** submit.php 19 Dec 2004 10:08:57 -0000 1.80
--- submit.php 22 Jan 2005 18:14:41 -0000 1.81
***************
*** 9,18 ****
// | Let users submit stories, links, and events. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony at tonybibbs.com |
! // | Mark Limburg - mlimburg at users.sourceforge.net |
! // | Jason Whittenburg - jwhitten at securitygeeks.com |
! // | Dirk Haun - dirk at haun-online.de |
// +---------------------------------------------------------------------------+
// | |
--- 9,18 ----
// | Let users submit stories, links, and events. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2005 by the following authors: |
// | |
! // | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
! // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
! // | Jason Whittenburg - jwhitten AT securitygeeks DOT com |
! // | Dirk Haun - dirk AT haun-online DOT de |
// +---------------------------------------------------------------------------+
// | |
***************
*** 489,492 ****
--- 489,502 ----
$A['introtext'] = COM_stripslashes ($A['introtext']);
+ // pseudo-formatted story text for the spam check
+ $spamcheck = '<h1>' . $A['title'] . '</h1><p>' . $A['introtext'] . '</p>';
+ $result = PLG_checkforSpam ($spamcheck, $_CONF['spamx']);
+ if ($result > 0) {
+ $retval = COM_refresh ($_CONF['site_url'] . '/index.php?msg=' . $result
+ . '&plugin=spamx');
+
+ return $retval;
+ }
+
$A['title'] = strip_tags (COM_checkWords ($A['title']));
$A['title'] = addslashes (str_replace ('$', '$', $A['title']));
***************
*** 575,580 ****
return $retval;
}
- $A['category'] = addslashes ($A['category']);
$A['description'] = addslashes (htmlspecialchars (COM_checkWords ($A['description'])));
$A['title'] = addslashes (strip_tags (COM_checkWords ($A['title'])));
--- 585,602 ----
return $retval;
}
+ // pseudo-formatted link description for the spam check
+ $spamcheck = '<p><a href="' . $A['url'] . '">' . $A['title'] . '</a> ('
+ . $A['category'] . ', ' . $A['categorydd'] . ')<br>'
+ . $A['description'] . '</p>';
+ $result = PLG_checkforSpam ($spamcheck, $_CONF['spamx']);
+ if ($result > 0) {
+ $retval = COM_refresh ($_CONF['site_url'] . '/index.php?msg=' . $result
+ . '&plugin=spamx');
+
+ return $retval;
+ }
+
+ $A['category'] = addslashes ($A['category']);
$A['description'] = addslashes (htmlspecialchars (COM_checkWords ($A['description'])));
$A['title'] = addslashes (strip_tags (COM_checkWords ($A['title'])));
***************
*** 670,673 ****
--- 692,708 ----
}
+ // pseudo-formatted event description for the spam check
+ $spamcheck = '<p><a href="' . $A['url'] . '">' . $A['title'] . '</a><br>'
+ . $A['location'] . '<br>' . $A['address1'] . '<br>'
+ . $A['address2'] . '<br>' . $A['city'] . ', ' . $A['zipcode']
+ . '<br>' . $A['description'] . '</p>';
+ $result = PLG_checkforSpam ($spamcheck, $_CONF['spamx']);
+ if ($result > 0) {
+ $retval = COM_refresh ($_CONF['site_url'] . '/index.php?msg=' . $result
+ . '&plugin=spamx');
+
+ return $retval;
+ }
+
$A['description'] = addslashes (htmlspecialchars (COM_checkWords ($A['description'])));
$A['address1'] = addslashes (strip_tags (COM_checkWords ($A['address1'])));
More information about the geeklog-cvs
mailing list