How to avoid leakage to prevent XSS attacks?

To prevent XSS attacks, output shielding enabled;

The above is from symfony, but I do not understand.

+3
source share
2 answers

XSS is an acronym for Cross-Site Scripting. Cross-site scripting attacks occur when you manage to hide a script (usually javascript) on someone else’s website where it can be maliciously launched.

XSS , -. , -, , My name is <script src="http://bad.domain/evilscript.js"></script>. , , , , HTML, , , script .

, escape. Escaping , ( ) , . HTML < > ( ), HTML. &lt; &gt; (. PHP htmlspecialchars()), HTML- .

Symfony , , , .

+7

XSS, - - javascript . , , javascript google.com, javascript, , Google , .

, ( / ), HTML , .

+1

Source: https://habr.com/ru/post/1730495/


All Articles