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: mod_rewrite & voting  (Read 3999 times)

0 Members and 1 Guest are viewing this topic.

garry

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • http://weter-peremen.ru/photo
mod_rewrite & voting
« on: September 21, 2006, 02:28:09 pm »

Vote doesn't work when mod_rewrite engine is on. But it works if following line in ratepic.php removed:

// If referer is not displayimage.php we don't accept the vote
if (!eregi("displayimage",$_SERVER["HTTP_REFERER"])){
    header('Location: displayimage.php?pos=' . (- $pic));
    exit;
}


Question: what is this line for?
« Last Edit: September 22, 2006, 01:45:24 am by Nibbler »
Logged

Nibbler

  • Guest
Re: mod_rewrite & voting
« Reply #1 on: September 21, 2006, 11:04:31 pm »

If referer is not displayimage.php we don't accept the vote.

This should not be an issue, since the referrer should still contain displayimage even when using the SEF urls plugin. Have you made any modifcations to the plugin? Do you have your client set to supress the http referer? Can you var_dump() what the referer is for you when the plugin is enabled?
Logged

garry

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
    • http://weter-peremen.ru/photo
Re: mod_rewrite & voting
« Reply #2 on: September 22, 2006, 01:32:21 am »

Sorry, it's my mistake. I've set in SEF plugin urls like "displayimage.php?pos-123" rewrite to "image-123.html"...
Logged

Nibbler

  • Guest
Re: mod_rewrite & voting
« Reply #3 on: September 22, 2006, 01:45:14 am »

;)
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.