concept xss attack in category javascript

appears as: XSS attacks
Third-Party JavaScript

This is an excerpt from Manning's book Third-Party JavaScript.

In this section, we’ll show you what XSS attacks look like, explain how they work, and show you how to defend your own application against such attacks. Let’s get started.

7.2.3. Defending your application against XSS attacks

All web applications—and especially third-party widgets—have many sources of untrusted data, and these sources can become entry points for XSS attacks. Unfortunately, the only viable solution for defending yourself against such attacks is to carefully filter all data coming from the outside—no matter whether it comes from the end user or even from your publisher.

Listing 7.3. Preventing XSS attacks by narrowing the scope around the input data