Wrong Referrer

Register an Account
 
 
Article Tools Display Modes
  #1 (permalink)  
Old 03-24-2009, 02:01 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM 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.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!

Last edited by Yankidank; 04-04-2009 at 01:24 AM.
Reply With Quote
  #2  

Wrong Referrer

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 02:01 AM
Last edited by Yankidank, 04-04-2009 at 01:24 AM
21 Comments , 14869 Views
 

Tags
referer

Article Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrong referrer error test_test123 Questions and Comments 4 11-30-2010 01:21 PM
Wrong Referrer stratum Questions and Comments 5 08-10-2009 04:04 PM
Pligg 1.0.0 - Wrong Referrer Tembargo Questions and Comments 0 08-05-2009 04:35 AM
Wrong referrer jarod13 Questions and Comments 2 06-22-2009 01:18 PM
Wrong Referrer for Pligg 1.0 RC4 argh2xxx Questions and Comments 0 04-02-2009 09: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