[pmwiki-users] Recipe Guestbook getting dozens of spamentries a day

John Rankin john.rankin at affinity.co.nz
Tue Aug 1 16:56:39 CDT 2006


On Wednesday, 2 August 2006 5:13 AM, David Sovinski <aslan at aslandata.com> wrote:
>Thanks Andy
>
>I renamed the Group and we'll see how that works. If not, I'll see about 
>using Blocklist2.

You may also add a check to the function that processes a guestbook
contribution to count the occurrences of '/https?:/' -- if there is
more than (say) 1, reject the post. Presumably, valid guestbook
contributions are unlikely to contain more than 1 or 2 links.

Something like:

# assume the action to post a guestbook contribution is 
# 'postguestbook' and the text is in $_POST['guesttext']

function auditguestbook() {
    preg_match_all('/https?:/',$_POST['guesttext'],$match);
    return (count($match)>1) ? false : true;
}

if ($action=='postguestbook') {
    if (auditguestbook()) $HandleActions['postguestbook'] = 'whatever...';
    else Redirect($pagename);
}

Just a thought...
>
>Dave (Caspian)
>
>Andrew Standfield wrote:
>
>> Have you tried Blocklist2 (http://www.pmwiki.org/wiki/Cookbook/ 
>> Blocklist2)
>>
>> Also... you might want to rename the group to something other than  
>> "Guestbook." Spambots love that word.
>>
>> -- 
>> Andy
>>
>> On Aug 1, 2006, at 7:13 AM, David Sovinski wrote:
>>
>>> My Guestbook recipe is getting dozens of automated junk entries a day.
>>>
>>> My Group "Guestbook" has a password so only I can edit (read that as
>>> clean-up the mess) the resulting content.
>>>
>>> What can I do to stop the bots from generating these porno links?
>>>
>>> Thanks
>>>
>>> Caspian
>>>


-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list