Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


codeigniter best practice to sanitize input


codeigniter best practice to sanitize input  using -'php,codeigniter,validation,sanitize'

I would like to know what's the best practice to sanitize user input using Codeigniter.

I understands that CI offers form_validation, such as set_rules.

'set_rules'=>'trim|xss_clean|alpha_numeric|htmlspecialchars'



  "Any native PHP function that accepts one parameter can be used as a
  rule, like htmlspecialchars, trim, MD5, etc."


My question now is,

is this enough to protect us from xss, sql injection attacks etc?

what other rules are there that I can apply?

in term of performance, is it costly for us to apply all these rules for all the inputs?

I understand MD5 is a hash funciton, but what happens if you set MD5 as part of the rule?

above that I've added javascript validation as well. Am I on the right track on sanitizing inputs and validating user inputs? Please advice.
    

asked Sep 15, 2015 by GenKtt
0 votes
30 views



Related Hot Questions



Walkin Jobs Opening



Government Jobs Opening


...