~/talk

Building Secure React Applications

Talkat Jfokus 2019 · 2019-02-04..02-06· [react, security]
slides:none on file

React is not a safe-by-default framework and five common pitfalls enable XSS: unvalidated JavaScript URLs in href/action, use of dangerouslySetInnerHTML without sanitization, unescaped prop/type values, CSS-based exfiltration, and old React <0.14 behaviors that disable escaping. Practical fixes shown: client-side URL validation, CSS-escaping libraries, run HTML through DOMPurify before injecting, serialize embedded JSON (Yahoo serializer) instead of JSON.stringify, add CSP strict-dynamic, and run retire.js / npm audit to catch vulnerable third‑party packages.

AI-written summary · about

  1. 0:00Start
  2. 4:14Session Hijacking
  3. 7:48A Polyglot Attack
  4. 9:23Securing React Components
  5. 11:32Protecting React from Standard Content Injection
  6. 19:51Validate Url
  7. 23:13Wysiwyg Editor
  8. 27:59Safe Handling of Json
  9. 29:38Yahoo Serializer
  10. 30:32Third-Party Components
  11. 33:43Npm Audit
~/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.