|
论坛发布帖子时候:提示:抱歉,您的请求来路不正确或表单验证串不符,无法提交
Discuz! 程序版本 | Discuz! X3.4 R20191201 UTF-8 | 百度找到网上的方法,都没成功解决,求高手帮一下,非常感谢
是不是需要修改下面的代码,我按照网上方法修改没成功
helper_form.php原始前段代码如下:有别的修改方法吗?
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: helper_form.php 35986 2016-06-06 01:37:04Z nemohou $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class helper_form {
public static function submitcheck($var, $allowget = 0, $seccodecheck = 0, $secqaacheck = 0) {
if(!getgpc($var)) {
return FALSE;
} else {
global $_G;
if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && $_GET['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) ||
strncmp($_SERVER['HTTP_REFERER'], 'http://wsq.discuz.com/', 22) === 0 || preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) {
if(checkperm('seccode')) {
if($secqaacheck && !check_secqaa($_GET['secanswer'], $_GET['secqaahash'])) {
showmessage('submit_secqaa_invalid');
}
if($seccodecheck && !check_seccode($_GET['seccodeverify'], $_GET['seccodehash'], 0, $_GET['seccodemodid'])) {
showmessage('submit_seccode_invalid');
}
}
return TRUE;
} else {
showmessage('submit_invalid');
}
}
}
|
|