From 212fb07be2a00c43483865d7b000d3549f5080b6 Mon Sep 17 00:00:00 2001 From: Ben Edmunds Date: Sat, 20 Aug 2011 14:02:33 -0500 Subject: Resolved issue 167 - Input Class Userguide Update --- user_guide/libraries/input.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 311f76ee9..77e28488a 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -73,11 +73,11 @@ Input Class

The security filtering function is called automatically when a new controller is invoked. It does the following:

@@ -133,13 +133,13 @@ else
$this->input->post('some_data', TRUE);

To return an array of all POST items call without any parameters.

-

To return all POST items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;

+

To return all POST items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;

The function returns FALSE (boolean) if there are no items in the POST.

- $this->input->post(); // returns all POST items with XSS filter + $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
- $this->input->post(NULL, FALSE); // returns all POST items without XSS + $this->input->post(); // returns all POST items without XSS filter

$this->input->get()

@@ -149,13 +149,13 @@ else
$this->input->get('some_data', TRUE);

To return an array of all GET items call without any parameters.

-

To return all GET items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;

+

To return all GET items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean;

The function returns FALSE (boolean) if there are no items in the GET.

- $this->input->get(); // returns all GET items with XSS filter + $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
- $this->input->get(NULL, FALSE); // returns all GET items without XSS filtering + $this->input->get(); // returns all GET items without XSS filtering

$this->input->get_post()

-- cgit v1.2.3-24-g4f1b From 87c74c885991075cf42e9e78d7843290e2b0c3a7 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 21 Aug 2011 16:28:43 +0100 Subject: Updated Security library documentation with details on how to whitelist URIs from CSRF protection --- user_guide/libraries/security.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/security.html b/user_guide/libraries/security.html index dd62a4386..cbe12d852 100644 --- a/user_guide/libraries/security.html +++ b/user_guide/libraries/security.html @@ -116,6 +116,9 @@ Note: This function should only be used to deal with data upon submission. It's

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

+

Select URIs can be whitelisted from csrf protection (for example API endpoints expecting externally POSTed content). You can add these URIs by editing the 'csrf_exclude_uris' config parameter:

+$config['csrf_exclude_uris'] = array('api/person/add'); + -- cgit v1.2.3-24-g4f1b From ccbbea1eaa8a0dd26aa05a0d860fda550f7dd7a8 Mon Sep 17 00:00:00 2001 From: Adam Jackett Date: Sun, 21 Aug 2011 16:19:11 -0400 Subject: Fixed issue #26. Added max_filename_increment as a config setting. --- user_guide/libraries/file_uploading.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html index a88c67220..94b219355 100644 --- a/user_guide/libraries/file_uploading.html +++ b/user_guide/libraries/file_uploading.html @@ -304,6 +304,13 @@ $this->upload->initialize($config); The maximum length that a file name can be. Set to zero for no limit. + +max_filename_increment +100 +None +When overwrite is set to FALSE, use this to set the maximum filename increment for CodeIgniter to append to the filename. + + encrypt_name FALSE -- cgit v1.2.3-24-g4f1b From d9c3a6f20e858b22ababbb2a3f3209eca1e93c13 Mon Sep 17 00:00:00 2001 From: Kyle Farris Date: Sun, 21 Aug 2011 23:08:17 -0300 Subject: Added documentation for some other rule someone added but didn't document. --- user_guide/libraries/form_validation.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/form_validation.html b/user_guide/libraries/form_validation.html index 7c544b69f..4400bac83 100644 --- a/user_guide/libraries/form_validation.html +++ b/user_guide/libraries/form_validation.html @@ -1037,6 +1037,13 @@ POST array:

  + + is_unique + Yes + Returns FALSE if the form element is not unique in a database table. + is_unique[table.field] + + valid_email No -- cgit v1.2.3-24-g4f1b