Is it okay to "re" xss-clear data in CodeIgniter?

The following are ways to clear XSS data in Codeigniter:

  • set global_xss_filteringin config toTRUE
  • use xss_clean()
  • use xss_cleanas a rule checks
  • set the second parameter TRUEto$this->input->post('something', TRUE)

Is it possible to use all or more than one of them on one piece of data?

For example, would it be nice if I still used it $this->input->post('something', TRUE), even if the data had already been cleared using global_xss_filteringand xss_cleanvalidation rules?

+5
source share
3 answers

It will not hurt you, but it is definitely pointless.

, , XSS . , $_REQUEST , . , , HTML, .

. , , , <script>, [removed], . , , "XSS" ? .

XSS, : HTML, javascript.

+8

. , "A". , , xss_clean, XSS- :

B = xss_clean(A)

, , , C:

C = css_clean(B)

, B C , , B xss- . , xss_clean , A . , , xss- , .

, , - , xss- ? , , , , ( , , , ).

, , - , - ( , , - ), .

, , codeigniters xss clean HTML . < > &lt; &gt;. , , , .

+4

xss_clean , . , . . . , , , . , a = b, xss_clean.

, xss_clean, . , , . , , , , xss_clean. , , , , , , . , xss_clean , , . - , , , , . xss_clean , .

xss_clean ( htmlentities ..), , , , (- , ). , xss_clean .

, , - , . , , , , , , . - , . . , , . , addlashes, , . , HTML, , . , , , , . . , , -. . , , , , . . , , , , .

xss_clean magic_quotes: http://en.wikipedia.org/wiki/Magic_quotes

: , . , (, ), . . xss_clean. , . , $published_data! == xss_clean ($ published_data), .

0

All Articles