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'; ... |
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']}'"); } |
=> 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..





Linear Mode




