Welcome Guest, Not a member yet? Register   Sign In
Is xss_clean still used in CodeIgniter 4?
#1

I am attempting to migrate a CodeIgniter 2 system to the latest version 4 of the framework. However, I am facing an issue while executing the function $nomUsr = $ security-> xss_clean ($ this-> input-> post ('nomUsr')) in CI4, which is resulting in an error. Is there something missing that I need to load into another file or has xss_clean been removed in CodeIgniter 4? Thanks in advance!
Reply
#2

xss_clean() does not prevent XSS perfectly, but breaks the input data unexpectedly. It is very bad practice in old age.
CI4 has no such functionality.
See https://codeigniter4.github.io/CodeIgnit...ipting-xss

But if you want input filtering CI4 has input filter functionality.
See https://codeigniter4.github.io/CodeIgnit...t::getPost

See also https://forum.codeigniter.com/post-371313.html
Reply




Theme © iAndrew 2016 - Forum software by © MyBB