[geeklog-cvs] geeklog-1.3/public_html comment.php,1.44.2.4,1.44.2.5
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Mon May 31 08:49:54 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv18212
Modified Files:
Tag: geeklog_1_3_8_1_1
comment.php
Log Message:
Fix for the anonymous comment spamming even if comments for anonymous users were switched off. Also added an additional check for the comment speed limit.
Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.44.2.4
retrieving revision 1.44.2.5
diff -C2 -d -r1.44.2.4 -r1.44.2.5
*** comment.php 23 Jan 2004 16:55:24 -0000 1.44.2.4
--- comment.php 31 May 2004 12:49:51 -0000 1.44.2.5
***************
*** 230,240 ****
$retval = '';
! if (($uid < 1) || (($uid != $_USER['uid']) && !empty ($_USER['username'])) ||
! (empty ($_USER['username']) && (($_CONF['loginrequired'] == 1) ||
! ($_CONF['commentsloginrequired'] == 1)))) {
$retval .= COM_refresh ($_CONF['site_url'] . '/index.php');
return $retval;
}
// Clean 'em up a bit!
if ($postmode == 'html') {
--- 230,259 ----
$retval = '';
! // ignore $uid as it may be manipulated anyway
! if (empty ($_USER['uid'])) {
! $uid = 1;
! } else {
! $uid = $_USER['uid'];
! }
!
! if (empty ($sid) || empty ($title) || empty ($comment) || empty ($type) ||
! (($uid == 1) && (($_CONF['loginrequired'] == 1) ||
! ($_CONF['commentsloginrequired'] == 1)))) {
$retval .= COM_refresh ($_CONF['site_url'] . '/index.php');
return $retval;
}
+ // Check for people breaking the speed limit
+ COM_clearSpeedlimit ($_CONF['commentspeedlimit'], 'comment');
+ $last = COM_checkSpeedlimit ('comment');
+ if ($last > 0) {
+ $retval .= COM_startBlock ($LANG12[26], '', COM_getBlockTemplate ('_msg_block', 'header'))
+ . $LANG03[7]
+ . $last
+ . $LANG03[8]
+ . COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
+ return $retval;
+ }
+
// Clean 'em up a bit!
if ($postmode == 'html') {
More information about the geeklog-cvs
mailing list