diff options
| author | tv <tv@krebsco.de> | 2026-11-08 14:20:26 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-08 15:33:31 +0100 |
| commit | d1754ca2d9519eaa78f978594cb81a2562970bca (patch) | |
| tree | 89a72ff7b3a1645eee9005484d1c967fb66fd3e2 /src/force.rs | |
| parent | d56b3b069782585a6edcc9c608236361c2644a51 (diff) | |
dashboard: a content security policy, framed by none
Review finding 12, browsers: the dashboard holds a bearer token in
memory and edits the document, but had no content security policy and
could be framed by any page of the same site (another port on the same
host, anything sharing a domain behind a proxy), acting with its user's
token.
The dashboard and the login page now come with a policy that runs only
their own inline script (by its hash, computed when first served),
loads nothing from elsewhere, and lets no page frame them
(frame-ancestors 'none', X-Frame-Options DENY). Fetches stay open to
any origin, as the members' dashboards are wherever the member list
says.
The browser check (check.js) loads the page from a file, without the
header, so the policy wants one look in a browser.
Diffstat (limited to 'src/force.rs')
0 files changed, 0 insertions, 0 deletions
