1
I am getting this error when I try to edit a post, or create a post through WordPress Module (on XOOPS 2.2 hotfixed).
Quote:
"You cannot update Database contents.(HTTP_REFERER is not valid site.)"
Searching all of the Wordpress files, I have narrowed this error down to the second part of the wp_refcheck function (below) in wordpress\wp-includes\functions.php. Unfortunately, I do not know what this function is doing, and why this is failing. Can any one give me a hint?
function wp_refcheck($offset = "", $redirect = true) {
global $siteurl;
$ref = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : $_ENV['HTTP_REFERER'];
if ($ref == '') {
if ($redirect) {
if (defined('XOOPS_URL')) { //XOOPS Module mode
redirect_header($siteurl, 1, "You cannot update Database contents.(Could not detect HTTP_REFERER)");
} else {
header("Location: $siteurl");
}
}
return false;
}
if (strpos($ref, $siteurl.$offset) !== 0 ) {
if ($redirect) {
if (defined('XOOPS_URL')) { //XOOPS Module mode
redirect_header($siteurl, 1, "You cannot update Database contents.(HTTP_REFERER is not valid site.)");
} else {
header("Location: $siteurl");
}
}
return false;
}
return true;
}