Wrong Referrer

Register an Account
Pligg Chat Room
 
 
LinkBack Article Tools Display Modes
  #1 (permalink)  
Old 03-24-2009, 01:01 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 3,800
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
PLEASE NOTE:
The "Wrong Referrer" message was mostly a problem with Pligg1.0 RC3. If you are experiencing the same issue with RC4 or above please submit a bug report.

Now Available: Facebook Connect Module !

Last edited by Yankidank; 04-04-2009 at 12:24 AM.
Reply With Quote
  #2  
Wrong Referrer is a message you might see if you try to navigate to a page that checks to make sure that the user was navigating to the page from your site, and not from another site or manually entered into the address bar of your browser. We added this to greatly reduce the chances of an XSRF hack that someone might try to exploit.

To remove this error and remove the security check you can remove the following line of code from files that give you the "Wrong Referrer" message:
Code:
check_referrer();
We advise against removing the security check, but it is understandable that not every site configuration will want to display a message when users directly access a common file such as submit.php

-------------------------------

I experienced this because I had "www" turned on in .htaccess when I should have disabled it.
You could experience this problem if you're switching between www and non-www.

To debug the problem, edit /libs/html1.php

Replace the function check_referrer() with .....
Code:
function check_referrer()
{
    global $my_base_url, $my_pligg_base;
 
    if (!strstr($_SERVER['HTTP_REFERER'],$my_base_url.$my_pligg_base)){
      die($_SERVER['HTTP_REFERER'] . '=' . $my_base_url.$my_pligg_base . 'Wrong Referrer');
    } 
}


Contributors: Yankidank
Created by Yankidank, 03-24-2009 at 01:01 AM
Last edited by Yankidank, 04-04-2009 at 12:24 AM
13 Comments , 5902 Views
 

Article Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong Referrer stratum Questions and Comments 5 08-10-2009 03:04 PM
Pligg 1.0.0 - Wrong Referrer Tembargo Questions and Comments 0 08-05-2009 03:35 AM
Wrong referrer jarod13 Questions and Comments 2 06-22-2009 12:18 PM
Wrong referrer error test_test123 Questions and Comments 2 05-29-2009 12:26 PM
Wrong Referrer for Pligg 1.0 RC4 argh2xxx Questions and Comments 0 04-02-2009 08:11 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development