Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Problems with SPAM and bots  (Read 2820 times)

0 Members and 1 Guest are viewing this topic.

ukcbajr

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Problems with SPAM and bots
« on: June 25, 2007, 05:01:08 am »

I noticed a few topics posted on this, but haven't seen any mention of this technique I use in my scripts (and which I added myself to coppermine.php scripts.)

For spam sent by robots (automated scripts), the bots essentially send form information to the ecard or comment scripts. It's as if the ecard form is on another webpage, but your webpage is doing the sending.

I add a filter at the start of my scripts to ensure all form information has been sent by my website. There's an environmental variable 'HTTP_REFERER' that contains this information. Here's the script (ok could be better written, but this is clear)

Quote
$eref = $_SERVER['HTTP_REFERER'];

$ecmatch=0;

if (stristr($eref, "http://www.mywebsite.com")) { $ecmatch=1; }
if (stristr($eref, "http://mywebsite.com")) { $ecmatch=1; }

if (!$ecmatch) {
   cpg_die(ERROR, $lang_ecard_php['error_no_data'], __FILE__, __LINE__);
}


For example, given that ecard.php can only be called from another .php script, I added this just before the line

Quote
pageheader($lang_ecard_php['title']);

Of course this won't stop the human spammer, but I hope this helps some...
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Problems with SPAM and bots
« Reply #1 on: June 25, 2007, 06:01:41 am »

Unfortunately, there is a flaw in depending on referer info since some users (knowingly or otherwise) have blocked or altered referer info for privacy purposes.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.