From the course: JavaScript: Security Essentials
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
What is cross-site scripting? - JavaScript Tutorial
From the course: JavaScript: Security Essentials
What is cross-site scripting?
- [Instructor] Cross-site scripting attacks is when a malicious script is injected into a trusted site. For example, add JavaScript code into an unsuspecting input in a form, and then use this to do all kinds of no good. Some example of attacks have been pulling data from cookies, session tokens, and all kinds of sensitive information. Let me demonstrate an example of cross-site scripting security issue. So go to learn.snyk.io/lesson/xss. And what you need to do is scroll down on this area here, so you can select any languages depending on what you want, but in this case, we're talking about JavaScript issues. So we'll click on JavaScript and then if you want to read through this, you can read as well. But I want you to pay attention to the second part of this here. So we have, Say hi to Emily here, and then you can scroll down all the way to here. And what we're going to do now is actually grab this style here. So basically, this is code, and we're going to insert this in here. And…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.