Welcome Guest, Not a member yet? Register   Sign In
Striping malicious code from inputs
#1

[eluser]Craig Ward[/eluser]
Whats the best way to strip malicious data from inputs/textareas?

I have tried the following which doesn't seem to get any results
Code:
$this->form_validation->set_rules('comments', 'Comments', 'strip_tags|trim|xss_clean|htmlspecialchars|encode_php_tags');


But the following code works well.
Code:
$_POST['comments'] = htmlspecialchars(strip_tags(encode_php_tags($_POST['comments'])));

I was hoping the CI security helpers would be of use but they don't seem to be doing anything useful.

Whats the best way to implement this using CI 2.0?


Messages In This Thread
Striping malicious code from inputs - by El Forum - 01-11-2011, 06:05 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 07:16 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 07:22 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 07:48 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 08:27 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 09:17 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 09:43 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 09:57 AM
Striping malicious code from inputs - by El Forum - 01-11-2011, 09:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB