32.2 XSS
One term that frequently appears in the recurring horror stories about websites with security vulnerabilities is cross-site scripting. This should actually be abbreviated to CSS, but this acronym is already reserved for Cascading Style Sheets, so the "X" was chosen, which often stands for cross, as it does here.
The effect of XSS is that script code is injected into the current page from outside. This crosses an authorization barrier because you can fool a website into believing that the injected code is your own. A small example will illustrate this. Imagine a simple guestbook application, as you have seen often in this book. In the following listing, you can first see the (lousy) script for entering data into the guestbook database ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access