~/talk

Security in Angular 2

Talkat ng-europe 2016 · 2016-10-25..10-26· [angular, security]
links:none on file
slides:none on file

Angular 2 escapes or sanitizes every binding by default and treats different contexts separately — HTML, CSS, script, URL and resource URL — so innerHTML only allows a safe subset and URLs that could run code are rejected. For embeds that must be allowed the DomSanitizer provides explicit escape hatches like bypassSecurityTrustResourceUrl and bypassSecurityTrustHtml, but code must validate inputs (example: regex-check YouTube IDs) and call bypass as close to validation as possible. Ahead-of-Time compilation removes the template compiler to prevent template injection; direct DOM access and misuse of bypass calls remain the main risks.

AI-written summary · about

  1. 0:00Introduction to Angular security
  2. 1:54Cross-site scripting risks
  3. 7:14Escaping vs sanitization
  4. 13:14Context-based sanitization
  5. 15:22Bypassing security safely
  6. 21:02Template injection prevention
  7. 22:04Security review and updates
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.