sec: hash tokens in DB, set Tauri CSP, escape quotes in XSS guard

- Session and email verification/reset tokens stored as SHA-256 hash in DB
  (raw token stays client-side in cookie/email link)
- Tauri CSP set: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline';
  img-src 'self' data: https:; connect-src 'self' wss: https:
- escapeHtml now handles double and single quotes to prevent attribute-based XSS
This commit is contained in:
2026-07-20 13:13:09 -04:00
parent d4ca5f576e
commit 57aec2c6b3
4 changed files with 20 additions and 9 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
}
],
"security": {
"csp": null
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; connect-src 'self' wss: https:;"
}
},
"bundle": {