Sugarcrm 8 XSRF

Sugarcrm 8 XSRF

我备份了 sugarcrm 8.0.0 企业版的 ondemand 实例

它对 CRUD 记录和其他东西正常工作,但是当我尝试通过 Zip 上传模块时,出现以下错误

Cross Site Request Forgery (XSRF) Attack Detected

Form authentication failure (Administration -> UpgradeWizard). Contact your administrator.

我试过以下文章 Troubleshooting Cross-Site Forgery Messages

但问题依然存在。该问题仅发生在 BWC 模块 IMO 中。

编辑:在尝试此 work-around 之前,请检查您的 Web 浏览器中是否禁用了 HTTP 引荐来源 header,因为这可能是首先出现所描述问题的原因。

如果这是本地 test/dev-instance 您可能需要添加

['csrf']['soft_fail_form'] = true,

config.phpconfig_override.php 中的 $sugar_config。这应该会导致仅记录错误而不是中止操作。

注意:这适用于 Sugar 7.9。我还没有在 8.0 上测试它。

来源:https://community.sugarcrm.com/community/developer/blog/2017/10/11/upcoming-security-changes-to-sugar

将此行添加到您的 config_override.php 文件中

$sugar_config['http_referer']['list'][] = 'http://CHANGE_TO_YOUR_LOCAL_URL/';
$sugar_config['csrf']['soft_fail_form'] = true;