P
P
PP2015-04-15 07:51:23
PHP
PP, 2015-04-15 07:51:23

Is it enough to use filter_input_array to protect against XSS?

Will the following code be enough to protect against xss?

$_POST  = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2015-04-15
@Kadi

Enough, but wrong.
Data must be formatted before use, not before saving.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question