From 1c97d565c47eb2a3b0802a9b0202deb5b5fe6760 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Fri, 28 Jan 2011 13:34:50 -0500 Subject: Added csrf to security docs --- user_guide/libraries/security.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user_guide') 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

If it is acceptable for the user input to include relative paths, e.g. file/in/some/approved/folder.txt, you can set the second optional parameter, $relative_path to TRUE.

- + $filename = $this->security->sanitize_filename($this->input->post('filename'), TRUE); +

Cross-site request forgery (CSRF)

+ +

You can enable csrf protection by opening your application/config/config.php file and setting this:

+$config['csrf_protection'] = TRUE; + +

If you use the form helper the form_open() function will automatically insert a hidden csrf field in your forms.

+ -- cgit v1.2.3-24-g4f1b