diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-11-27 21:36:39 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-11-27 21:36:39 +0100 |
commit | b9ad907ca50c5067f8eec1ccf77544cf62466b17 (patch) | |
tree | ed24b7437f8575aead72804a512f6b2f72118a73 /system/helpers | |
parent | b8188f6a588fbf2a4b9570580999317ba149ecb0 (diff) | |
parent | 9a05d2b0d838bb000a89ab9ea78a307b557768e7 (diff) |
Merge pull request #710 from johnnicely/2.1-stable
Changed form_open() to compare $action against base_url().
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/form_helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index d9305c00b..8733ae053 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -65,7 +65,7 @@ if ( ! function_exists('form_open')) $form .= '>'; // Add CSRF field if enabled, but leave it out for GET requests and requests to external websites - if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->site_url()) === FALSE OR strpos($form, 'method="get"'))) + if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->base_url()) === FALSE OR strpos($form, 'method="get"'))) { $hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash(); } |