diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-02-02 22:19:25 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-02-02 22:19:25 +0100 |
commit | d88b31550ae2aeb0e3bcc11ba82d4838f8a5fd31 (patch) | |
tree | 792bff97d41430b5c36a08c8ec3ac54db97375b6 /user_guide/libraries/security.html | |
parent | 5c59c7dc3254616b18057922ce012f22c18b147b (diff) | |
parent | 75f5ff5d99533a423e68686d89889d172c37d98e (diff) |
Merged recent changes and tweaked multi-env changes.
Diffstat (limited to 'user_guide/libraries/security.html')
-rw-r--r-- | user_guide/libraries/security.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index 6d6216d95..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 --> @@ -121,7 +128,7 @@ Previous Topic: <a href="pagination.html">Pagination Class</a> <a href="../index.html">User Guide Home</a> · Next Topic: <a href="sessions.html">Session Class</a> </p> -<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006-2010 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> +<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2011 · <a href="http://ellislab.com/">EllisLab, Inc.</a></p> </div> </body> |