Answer the question
In order to leave comments, you need to log in
How to properly protect against xss?
Good afternoon. I read a lot of articles about protection against xss, but specific cases are considered everywhere, there is no fundamental article that describes absolutely all the possibilities for an attack. The situation looks like everyone knows how to write a defense, but no one shares)
Give a link to such an article if I'm wrong :)
Thank you
Answer the question
In order to leave comments, you need to log in
There is no universal tablet. There are general principles that are usually shown in the examples that you criticize.
To put it bluntly: filter and check data you don't trust.
Further, only particulars and examples, but you don’t like them.
Look how it's done in good frameworks. You pass input data through validators, output data through a purifier, queries to the database through prepared.
Use HTTP security headers
https://kostikov.co/post/zagolovki-http-i-bezopasn...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question