0

この問題のトラブルシューティングに最善を尽くしましたが、これをクロス ブラウザーで動作させることができませんでした。CodeIgniter のドキュメント ページhttp://goo.gl/YCKU7へのリンクを次に示します。下にスクロールして、セクションクロスサイト リクエスト フォージェリ (CSRF)を確認してください。

以下は、いくつかのフォーラム投稿から抜粋した手順です。

  1. 構成を設定

    $config['csrf_protection'] = TRUE;
    
  2. Cookie名から「_」を削除

    $config['sess_cookie_name']     = 'sfe';
    $config['sess_expiration']      = 7200;
    $config['sess_expire_on_close'] = TRUE;
    $config['sess_encrypt_cookie']  = FALSE;
    $config['sess_use_database']    = TRUE;
    $config['sess_table_name']      = 'ci_sessions';
    $config['sess_match_ip']        = FALSE;
    $config['sess_match_useragent'] = TRUE;
    $config['sess_time_to_update']  = 300;
    
    $config['csrf_protection']      = TRUE;
    $config['csrf_token_name']      = 'csrftestname';
    $config['csrf_cookie_name']     = 'csrfcookiename';
    $config['csrf_expire']          = 7200;
    
  3. Cookie 関連の変数

    $config['cookie_prefix']    = "";
    $config['cookie_domain']    = "";
    $config['cookie_path']      = "/";
    $config['cookie_secure']    = FALSE;
    
  4. でフォームを作成form_open()

からのログcode_application/logs/

DEBUG - 2013-04-04 18:33:10 --> Config Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Hooks Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Utf8 Class Initialized
DEBUG - 2013-04-04 18:33:10 --> UTF-8 Support Enabled
DEBUG - 2013-04-04 18:33:10 --> URI Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Router Class Initialized
DEBUG - 2013-04-04 18:33:10 --> No URI present. Default controller set.
DEBUG - 2013-04-04 18:33:10 --> Output Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Security Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Input Class Initialized
DEBUG - 2013-04-04 18:33:10 --> XSS Filtering completed
DEBUG - 2013-04-04 18:33:10 --> XSS Filtering completed
DEBUG - 2013-04-04 18:33:10 --> XSS Filtering completed
DEBUG - 2013-04-04 18:33:10 --> CRSF cookie Set
DEBUG - 2013-04-04 18:33:10 --> Global POST and COOKIE data sanitized
DEBUG - 2013-04-04 18:33:10 --> Language Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Loader Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Helper loaded: form_helper
DEBUG - 2013-04-04 18:33:10 --> Helper loaded: url_helper
DEBUG - 2013-04-04 18:33:10 --> Database Driver Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Form Validation Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Session Class Initialized
DEBUG - 2013-04-04 18:33:10 --> Helper loaded: string_helper
DEBUG - 2013-04-04 18:33:10 --> A session cookie was not found.
DEBUG - 2013-04-04 18:33:13 --> Session routines successfully run
DEBUG - 2013-04-04 18:33:13 --> Controller Class Initialized
DEBUG - 2013-04-04 18:33:13 --> File loaded:     /home/rpowell/codeigniter/sfe/code_application/views/view_home.php
DEBUG - 2013-04-04 18:33:13 --> Final output sent to browser
DEBUG - 2013-04-04 18:33:13 --> Total execution time: 2.4202
DEBUG - 2013-04-04 19:25:32 --> Config Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Hooks Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Utf8 Class Initialized
DEBUG - 2013-04-04 19:25:32 --> UTF-8 Support Enabled
DEBUG - 2013-04-04 19:25:32 --> URI Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Router Class Initialized
DEBUG - 2013-04-04 19:25:32 --> No URI present. Default controller set.
DEBUG - 2013-04-04 19:25:32 --> Output Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Security Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Input Class Initialized
DEBUG - 2013-04-04 19:25:32 --> XSS Filtering completed
DEBUG - 2013-04-04 19:25:32 --> XSS Filtering completed
DEBUG - 2013-04-04 19:25:32 --> XSS Filtering completed
DEBUG - 2013-04-04 19:25:32 --> XSS Filtering completed
DEBUG - 2013-04-04 19:25:32 --> XSS Filtering completed
DEBUG - 2013-04-04 19:25:32 --> CRSF cookie Set
DEBUG - 2013-04-04 19:25:32 --> Global POST and COOKIE data sanitized
DEBUG - 2013-04-04 19:25:32 --> Language Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Loader Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Helper loaded: form_helper
DEBUG - 2013-04-04 19:25:32 --> Helper loaded: url_helper
DEBUG - 2013-04-04 19:25:32 --> Database Driver Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Form Validation Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Session Class Initialized
DEBUG - 2013-04-04 19:25:32 --> Helper loaded: string_helper
DEBUG - 2013-04-04 19:25:32 --> Session routines successfully run
DEBUG - 2013-04-04 19:25:32 --> Controller Class Initialized
DEBUG - 2013-04-04 19:25:32 --> File loaded:     /home/rpowell/codeigniter/sfe/code_application/views/view_home.php
DEBUG - 2013-04-04 19:25:32 --> Final output sent to browser
DEBUG - 2013-04-04 19:25:32 --> Total execution time: 0.0520

この投稿に出くわしました: http://goo.gl/n63tCで、サーバーの時間と関係があるかどうかを調べます。

4

0 に答える 0