| Author |
Message |
tkevans
Nuke Soldier


Joined: Jul 14, 2003
Posts: 29
Location: Baltimore, MD, USA
|
Posted:
Wed May 11, 2005 11:35 am |
  |
I noted this week a couple of thousand spam/porn comments attached to news articles on my 7.4 site. Turning on comment moderation did not seem to stop additional such postings. While I've reluctantly taken away anonymous-posting, and emptied out the database table to clear this stuff, what else can be done? |
|
|
     |
 |
networkboy
Nuke Soldier


Joined: Sep 03, 2004
Posts: 14
|
Posted:
Thu May 12, 2005 10:10 pm |
  |
I had the same problem, and had to do the same thing to stop it
-nB |
|
|
   |
 |
aenigma
Nuke Soldier


Joined: May 27, 2003
Posts: 34
Location: Somewhere in time...
|
Posted:
Thu May 12, 2005 10:32 pm |
  |
I made a little patch so that is neeeded to insert the security code to post a comment.
I'm using on my site and it's functioning and also anonymous can post.
I Will release the instructions in this WeekEnd on my site at http://www.thekey.it
The site is in italian, but I will release instructions in english too. |
_________________ Eremita Solitario
http://www.thekey.it |
|
    |
 |
tkevans
Nuke Soldier


Joined: Jul 14, 2003
Posts: 29
Location: Baltimore, MD, USA
|
Posted:
Fri May 13, 2005 4:27 am |
  |
| Quote: |
| I made a little patch so that is neeeded to insert the security code to post a comment. |
Thanks for your reply. How can you require security code if anonymous is posting?[/quote] |
|
|
     |
 |
elr
Captain


Joined: Mar 09, 2004
Posts: 329
|
Posted:
Fri May 13, 2005 4:44 am |
  |
aenigma,
I am interested in seeing what you did too. I've also wanted to open my articles to anon comments but haven't because of the spam issues. |
|
|
   |
 |
aenigma
Nuke Soldier


Joined: May 27, 2003
Posts: 34
Location: Somewhere in time...
|
Posted:
Fri May 13, 2005 1:16 pm |
  |
|
    |
 |
KevinE
Private


Joined: Apr 18, 2004
Posts: 46
|
Posted:
Sat May 14, 2005 1:54 pm |
  |
I downloaded you instructions and made the 3 changes as you suggested and it made absolutely no difference on my site what so ever, but my comments are being posted in the review section so it may not. |
|
|
   |
 |
aenigma
Nuke Soldier


Joined: May 27, 2003
Posts: 34
Location: Somewhere in time...
|
Posted:
Sun May 15, 2005 12:11 am |
  |
Which is your site?
The patch is for articles (News module), not for review, I think it's possible to adapt the same patch for review with some changes, but I do not use review so I do not looked at it. |
_________________ Eremita Solitario
http://www.thekey.it |
|
    |
 |
KevinE
Private


Joined: Apr 18, 2004
Posts: 46
|
Posted:
Sun May 15, 2005 5:21 am |
  |
That's what I was afraid of that the patch was for news comments only. Hopefully some code wizard can work the code offer to make it work with comments for reviews.
Does anyone know what ill effect it might have if I just dropped the comment table from my data base? |
|
|
   |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12482
|
Posted:
Sun May 15, 2005 8:55 am |
  |
|
     |
 |
aenigma
Nuke Soldier


Joined: May 27, 2003
Posts: 34
Location: Somewhere in time...
|
Posted:
Mon May 16, 2005 12:09 am |
  |
| KevinE wrote: |
| Hopefully some code wizard can work the code offer to make it work with comments for reviews. |
If I got enough time I will try do to it. But I connot grant anything. |
|
|
    |
 |
arnoldkrg
Major


Joined: Aug 03, 2003
Posts: 936
Location: United Kingdom
|
Posted:
Mon May 16, 2005 3:16 am |
  |
Here is a fix to include security code in Reviews comments (based on aenigma's News comments antispam fix)
in modules/Reviews/index.php find in postcomment function (around line 484 in my version):
| Code: |
<input type=hidden name=rop value=savecomment>
<input type=submit value=Submit> |
and change to:
| Code: |
<input type=hidden name=rop value=savecomment>";
/* Start Patch for security code by aeniGma - http://www.thekey.it */
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
echo "<br><font class=\"option\"><b>Type security-code:</b></font><br>";
echo "<img src='?gfx=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>";
echo "<input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\"><br>";
echo "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>";
/* End Patch for security code */
echo "<input type=submit value=Submit> |
Next in modules/Reviews/index.php find in switch list around line 938:
| Code: |
case "savecomment":
savecomment($xanonpost, $uname, $id, $score, $comments);
break; |
and change to:
| Code: |
case "savecomment":
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if ($code != $gfx_check) {
include ("header.php");
echo "security code was incorrect"._GOBACK."";
include ("footer.php");
} else {
savecomment($xanonpost, $uname, $id, $score, $comments);
}
break; |
I have just tested it on a PHP-Nuke 7.5 site and it seems to work fine. |
_________________
 |
|
     |
 |
Slackervaara
Captain


Joined: Sep 13, 2003
Posts: 355
|
Posted:
Mon May 16, 2005 7:42 am |
  |
I have had BIG problems with spam in news comments in PHP-Nuke 7.2. I tried to modify comments.php, BUT the security code does not show up, but instead only the text security code.
I have stopped the spammer, which seems to be some kind of robot that change IP-address between each post almost. The spamming was stopped by disallowing anonymous posting. |
|
|
   |
 |
KevinE
Private


Joined: Apr 18, 2004
Posts: 46
|
Posted:
Mon May 16, 2005 3:31 pm |
  |
I made the changes as you suggested and I can still post anonymously to all of the reviews. it seemed to make no difference on Nuke 7.3. But thanks for the effort. Maybe dropping the table is the way to go after all? |
|
|
   |
 |
Evaders99
Site Admin


Joined: Aug 17, 2003
Posts: 12482
|
Posted:
Mon May 16, 2005 4:28 pm |
  |
|
     |
 |
|
|