The XSRF popup message would keep coming up, despite the fact that I tried all these suggestions
1. I tried the suggested "create a config_override.php file" and that worked for a little while, until I went to the Dropdown Editor under the Admin section. Then I got the popups back again. This is what my config_override.php looked like:
Code:
<?php
/***CONFIGURATOR***/
$sugar_config['default_module_favicon'] = false;
$sugar_config['dashlet_auto_refresh_min'] = '30';
$sugar_config['stack_trace_errors'] = false;
$sugar_config['developerMode'] = false;
$sugar_config['dbconfigoption']['collation'] = 'utf8_general_ci';
$sugar_config['default_currency_iso4217'] = 'CAD';
$sugar_config['default_currency_name'] = 'Canadian Dollars';
$sugar_config['default_date_format'] = 'Y-m-d';
// avoids the Cross-site forgery attack blocker
$sugar_config['http_referer']['list'][] = 'localhost';
$sugar_config['http_referer']['actions'] =array( 'index', 'ListView', 'DetailView', 'EditView', 'oauth', 'Authenticate', 'Login', 'Save2' );
/***CONFIGURATOR***/
?>
2. I also tried a blank config_override.php file, and that didn't work
The last straw for me was to just find the place where the logic was checking for XSRF and comment it out. I found that by commenting out two sections of SugarApplication.php that this would work
comment out line 529 to line 540
Code:
/**
if ( $dieIfInvalid ) {
header("Cache-Control: no-cache, must-revalidate");
$ss = new Sugar_Smarty;
$ss->assign('host', $http_host[0]);
$ss->assign('action',$this->controller->action);
$ss->assign('whiteListString',$whiteListString);
$ss->display('include/MVC/View/tpls/xsrf.tpl');
sugar_cleanup(true);
}
return false;
**/ and
comment out line 547 to line 561
Code:
/**
if ( $dieIfInvalid ) {
header("Cache-Control: no-cache, must-revalidate");
$whiteListActions[] = $this->controller->action;
$whiteListString = "'" . implode("', '", $whiteListActions) . "'";
$ss = new Sugar_Smarty;
$ss->assign('host',$http_ref['host']);
$ss->assign('action',$this->controller->action);
$ss->assign('whiteListString',$whiteListString);
$ss->display('include/MVC/View/tpls/xsrf.tpl');
sugar_cleanup(true);
}
return false;
**/ I wish this security feature actually worked, but I have no time to debug it.
Bookmarks