php - change csrf token after form submission in codeigniter -
in config file have following csrf setting:
$config['csrf_protection'] = true; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; $config['csrf_regenerate'] = true; $config['csrf_exclude_uris'] = array();
problem after form submission session doesn't deleted.if session doesn't destroyed after form submission ,it create security risk.i mean that's how should work submit form , after form submission token gets deleted session.
how can solve issue?
$config['csrf_regenerate'] = false;