K
K
komarevtsev2017-07-11 04:16:34
JavaScript
komarevtsev, 2017-07-11 04:16:34

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

3 answer(s)
S
Stalker_RED, 2017-07-11
@Stalker_RED

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.

A
Alexander, 2017-07-11
@Minifets

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.

M
Max Kostikov, 2017-07-11
@mxms

Use HTTP security headers
https://kostikov.co/post/zagolovki-http-i-bezopasn...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question