Results 1 to 6 of 6

Thread: fail to login

  1. #1
    lwkiong is offline Junior Member
    Join Date
    Mar 2011
    Posts
    2

    Default fail to login

    Hi,

    I just installed SugarCRM CE v6.1.2 and I unable to login with error message below: -

    Possible Cross Site Request Forgery (XSRF) Attack Detected

    Directions
    On your file system go to the root of your SugarCRM instance
    Open the file config_override.php. If it does not exist, create it. (it should be at the same level as index.php and config.php)
    Make sure the file starts with
    <?php
    followed by a new line
    Add the following line to your config_override.php file

    $sugar_config['http_referer']['list'][] = 'support.maxmulia.com';
    Save the file and it should work
    Attempted action (Authenticate)
    If you feel this is a valid action that should be allowed from any referer, add the following to your config_override.php file
    $sugar_config['http_referer']['actions'] =array( 'index', 'ListView', 'DetailView', 'EditView', 'Authenticate' );



    I tried create config_override.php by adding above line but does not work.

    Appreciate any body and advice ..

  2. #2
    AlexAv's Avatar
    AlexAv is offline Sugar Community Member
    Join Date
    Oct 2009
    Location
    Ukraine
    Posts
    922

    Default Re: fail to login

    Is it solved your problem?
    As I understand support.maxmulia.com is link to your SugarCRM instance
    Letrium ltd. - Only high quality service
    http://letrium.com

  3. #3
    lwkiong is offline Junior Member
    Join Date
    Mar 2011
    Posts
    2

    Default Re: fail to login

    Hi,

    Nope. I tried and it does not work and I still cannot login.

    Pleaes advise

  4. #4
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: fail to login

    Can you post your config_override.php file here
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  5. #5
    allstarimage is offline Junior Member
    Join Date
    Feb 2011
    Posts
    3

    Default Re: fail to login

    It's working very well and i also working on it... Cool

  6. #6
    m00uze is offline Member
    Join Date
    Mar 2011
    Posts
    9

    Default Re: fail to login

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Test recovery fail - no login box
    By paradilly in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2010-11-22, 08:28 AM
  2. Customer Portal -- login credentials fail
    By cefladental in forum Help
    Replies: 3
    Last Post: 2010-03-22, 07:45 PM
  3. Fail to run cron tab
    By lehoangngochan in forum Help
    Replies: 0
    Last Post: 2007-04-18, 10:39 AM
  4. Login Fail
    By vasimakhtar in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2007-01-29, 02:08 AM
  5. second login fail
    By pjvanb in forum Help
    Replies: 3
    Last Post: 2005-12-23, 09:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •