Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strange problem when saving a page
#6
This worked perfectly. Thank you.

I think there is an extra ')' in the second if. Should read.

Code:
// check form referrer - needs siteurl and edit.php in it.
if (isset($_SERVER['HTTP_REFERER'])) {
        if ( !(strpos(str_replace('http://www.', '', $SITEURL), $_SERVER['HTTP_REFERER']) === false) || !(strpos("edit.php", $_SERVER['HTTP_REFERER']) === false)) {
                echo "<b>Invalid Referer</b><br />-------<br />";
                echo 'Invalid Referer: ' . $_SERVER['HTTP_REFERER'];
                die;
        }
}
Reply


Messages In This Thread
strange problem when saving a page - by adrnlnrsh - 2010-04-07, 13:42:18
strange problem when saving a page - by adrnlnrsh - 2010-04-08, 12:35:10
strange problem when saving a page - by tnyse - 2010-04-16, 13:27:18
strange problem when saving a page - by chefbyte - 2010-04-17, 00:53:44
strange problem when saving a page - by tnyse - 2010-04-17, 01:54:29
strange problem when saving a page - by ccagle8 - 2010-04-18, 00:46:31
strange problem when saving a page - by Bingo - 2010-05-11, 19:59:28
strange problem when saving a page - by ash.1111 - 2010-05-24, 23:06:12
strange problem when saving a page - by ash.1111 - 2010-05-25, 18:16:19



Users browsing this thread: 1 Guest(s)