From the course: Security in ASP.NET Core
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Cross-site scripting (XSS) in single-page applications - ASP.NET Tutorial
From the course: Security in ASP.NET Core
Cross-site scripting (XSS) in single-page applications
- [Instructor] When talking about single application frameworks, you may first think about Blazor, but Blazor is using the Razor engine as well, so everything we've discussed with regards to HTML escaping for ASP.NET Core MVC and Razor Pages also applies to Blazor. So, you are already set there. However, there are other single-page application frameworks as well. And while they are a little bit beyond the scope of this ASP.NET Core security course, I still would like to briefly cover this topic. So what does, for instance, Angular do against cross-site scripting? Turns out there is some automated protection. If you are binding data using the double curly braces, you get automated HTML escaping out of the box. So once again, even if you have no clue about cross-site scripting, and of course, now you have lots of clue (chuckles) with regards to cross-site scripting, but even if you hadn't, you would have some solid protection against the attack. There are some areas where this HTML…
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.
Contents
-
-
-
OWASP Top Ten2m 45s
-
(Locked)
Cross-site scripting (XSS): The attack4m 33s
-
(Locked)
Cross-site scripting (XSS): The defense3m 25s
-
(Locked)
Cross-site scripting (XSS) in JavaScript4m 40s
-
(Locked)
Cross-site scripting (XSS) in single-page applications3m 30s
-
(Locked)
Same-origin policy and CORS4m 26s
-
(Locked)
Enabling CORS in ASP.NET Core web API6m 23s
-
(Locked)
SQL injection with ADO.NET2m 25s
-
(Locked)
SQL injection with Entity Framework Core2m 34s
-
(Locked)
Fixing SQL injection5m 23s
-
(Locked)
Cross-Site Request Forgery (CSRF): The attack5m 25s
-
(Locked)
Cross-Site Request Forgery (CSRF): The defense7m 11s
-
-
-
-
-