Skip to content

Commit

Permalink
also prevent iframes in svg, thanks Hidde van Ulsen
Browse files Browse the repository at this point in the history
  • Loading branch information
berthubert committed Jan 20, 2024
1 parent 4d42dff commit 5f9cc97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int trifectaMain(int argc, const char**argv)

cr.log({{"action", "view"}, {"imageId", imgid}});
// this is needed for SVG which can contain embedded JavaScript (yes)
cr.res.set_header("Content-Security-Policy", "script-src 'none';");
cr.res.set_header("Content-Security-Policy", "script-src 'none'; frame-src 'none';");
return make_pair(s, get<string>(results[0]["content_type"]));
});

Expand Down

0 comments on commit 5f9cc97

Please sign in to comment.