summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/security.html
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-02-16 20:03:49 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-02-16 20:03:49 +0100
commit33ed0f37b6b8f2223cd3362bf8fca28102ab67c6 (patch)
tree99c613720a2fd8541764bb6fc893e0da28fa269b /user_guide/libraries/security.html
parent154da11c5bb4b7dc5c225f4fa018852ee45cc6eb (diff)
parentd8d1e24eee56d2466c91ecd72b3c8932eb3d0639 (diff)
Merged CodeIgniter Core changes and integrated rob1's secure cookie change into my secure cookie change.
Diffstat (limited to 'user_guide/libraries/security.html')
-rw-r--r--user_guide/libraries/security.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html
index 5cd274787..943f72a0f 100644
--- a/user_guide/libraries/security.html
+++ b/user_guide/libraries/security.html
@@ -104,11 +104,18 @@ Note: This function should only be used to deal with data upon submission. It's
<p>If it is acceptable for the user input to include relative paths, e.g. <kbd>file/in/some/approved/folder.txt</kbd>, you can set the second optional parameter,
<samp>$relative_path</samp> to TRUE.</p>
-
+
<code>$filename = $this->security->sanitize_filename($this->input->post('filename'), TRUE);</code>
<!-- @todo write docs for CSRF methods -->
+<h2>Cross-site request forgery (CSRF)</h2>
+
+<p>You can enable csrf protection by opening your <kbd>application/config/config.php</kbd> file and setting this:</p>
+<code>$config['csrf_protection'] = TRUE;</code>
+
+<p>If you use the <a href="../helpers/form_helper.html">form helper</a> the <var>form_open()</var> function will automatically insert a hidden csrf field in your forms.</p>
+
</div>
<!-- END CONTENT -->