Pligg 1.0.0 - Wrong Referrer

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2009, 04:35 AM
New Pligger
Pligg Version: 1.0.0
 
Join Date: Aug 2009
Posts: 2
Bonjour,

So I had a "Wrong Referrer" error just after the install of "Pligg CMS 1.0.0".
If like me, you keep a folder of the project with some space in the name.. You should have a "Wrong Referrer" error.
For example me, I put on my server a folder "Pligg CMS 1.0.0".

After some tests, I found that the install wrote in my .\settings.php
Quote:
...
$my_pligg_base = '/Pligg CMS 1.0.0';
...
No %20 but some space

and in the file .\libs\html1.php, in the famous function check_referrer() we compare $_SERVER['HTTP_REFERER'] and the url composed of $my_pligg_base

Quote:
if (!strstr(preg_replace('/^.+:\/\/(www\.)?/','',$_SERVER['HTTP_REFERER']),preg_replace('/^.+:\/\/(www\.)?/','',$my_base_url).$my_pligg_base))
{
unset($_SESSION['xsfr']);
die("Wrong Referrer '{$_SERVER['HTTP_REFERER']}'");
}
Or $_SERVER['HTTP_REFERER'] has No space but some %20

=> Wrong Referrer

How to fix it fast : in settings.php, just replace space by %20
example : $my_pligg_base = '/Pligg CMS 1.0.0'; => $my_pligg_base = '/Pligg%20CMS%201.0.0';

But for the next version of Pligg, you should use the functions rawurldecode or rawurlencode to fix it.

Hope to have been usefull..
Reply With Quote
Reply

Tags
pligg 1.0.0, wrong referrer

Thread 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
FS: AggrePress Template For Pligg 1.0.0 cmstheme Templates for Sale 13 08-10-2010 03:57 PM
TacticNews II - April Pligg Template. Pligg 1.0.0 . grusha Templates for Sale 20 06-18-2009 05:12 AM
Pligg 1.0.0 RC5 Yankidank Current Version 1 05-14-2009 12:38 AM
Pligg 1.0.0 RC2 Yankidank Current Version 1 04-02-2009 12:21 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