首页 > 请问提示CSRF error. Please try again应该怎么解决

请问提示CSRF error. Please try again应该怎么解决

I've just moved my website on to a new server and everything seems fine except when I try to submit a new item. I get "CSRF error. Please try again" on step 2 of submission. I also use the light submission plugin, but even if I disable it still the same error. Please some one help me...I've tried everything.
Most of you know my website.


不熟悉这东西也懒得看 ... 不过估计应该是 extension 冲突 ...

你找这个文件 /libs/extensions/csrf/csrf_class.php ... 13 - 15 行 ...

    public function csrfInit($h, $type = 'check', $action = 'unspecified', $life = 60)
    {
        $this->sid = preg_replace('/[^a-z0-9]+/i', '', session_id());

加上一行变成这样 ...

    public function csrfInit($h, $type = 'check', $action = 'unspecified', $life = 60)
    {
        return true;
        $this->sid = preg_replace('/[^a-z0-9]+/i', '', session_id());

这样会废掉所有 CSRF 检测 ... 但是可以解决你的问题 ...

【热门文章】
【热门文章】