diff --git a/README.md b/README.md index f1c683f..98eb50f 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,18 @@ Then serve the `dist/` folder, with these requirements: - **`sw.js` next to `index.html`.** It streams the downloads. Requests to the `download/` path below HellCon must reach it unchanged, so don't rewrite them to `index.html`. +Recommended, as response headers, a `` can't set them (`index.html` sets +`Referrer-Policy: no-referrer` itself): + +``` +Content-Security-Policy: frame-ancestors 'none' +X-Frame-Options: DENY +X-Content-Type-Options: nosniff +``` + +The first two keep other sites from framing HellCon and laying their own page over its buttons, +`X-Frame-Options` for older browsers. + Your own tracker and STUN server are optional, any public ones work. `backend/` has both as Docker Compose services: a tracker that only does what HellCon needs, with an Origin allowlist and limits, and coturn as STUN server. `backend/compose.yaml` says how to set them up. diff --git a/TODO.md b/TODO.md index ce26447..01646ee 100644 --- a/TODO.md +++ b/TODO.md @@ -9,19 +9,6 @@ From a security review, none of them urgent. `invoiceexe.pdf`. Strip C0/C1 and bidi controls where the name is shown and logged, maybe for `Content-Disposition` in `sw.js` too, though browsers sanitize download names themselves. -- Limit what a tracker can make the page do: no size or rate limit on its messages, `parse` and - `unseal` take whatever arrives, failure reasons after acceptance are logged, and the log in - `App.vue` grows without bound. A malicious tracker can freeze the tab. Only availability, and only - of a tracker the user chose, but cheap: cap `event.data.length` before parsing, cap the log, drop - failure reasons after acceptance or log one. - -- Framing: no `frame-ancestors`, so another page can frame HellCon and overlay the security check's - buttons. Gains little: a framed HellCon starts empty like any other, nothing is kept, so it has no - file or offer the user didn't pick or paste inside it, and the address bar shows the framing site. - That site could as well serve a modified copy that fakes the codes. `frame-ancestors` and - `X-Frame-Options` only work as headers, not in a ``. Recommend them, - `X-Content-Type-Options: nosniff` and `Referrer-Policy: no-referrer` in Host your own. - ## Ideas - Resume interrupted transfers: the receiver already reports how much the download manager has diff --git a/biome.json b/biome.json index b8e2c65..88090f8 100644 --- a/biome.json +++ b/biome.json @@ -30,6 +30,10 @@ "MAX_BUFFERED", "WINDOW", "TRACKER_TIMEOUT", + "MAX_TRACKER_MESSAGE", + "MAX_TRACKER_MESSAGES", + "MESSAGE_WINDOW", + "TRACKER_NOTES", "CONNECT_TIMEOUT", "MIN_INTERVAL", "PBKDF2_ITERATIONS", diff --git a/index.html b/index.html index eaa8a50..6ae8026 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ + HellCon diff --git a/src/App.vue b/src/App.vue index eb1cc05..35383ad 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@