Skip to content

Commit

Permalink
make the web ui more to chrome's liking
Browse files Browse the repository at this point in the history
chrome does not like setting innerHTML, because it might be vulnerable
to injection, but since we don't add user controlled data, we're fine

require-trusted-types-for 'script'; trusted-types default; needs adding
to Content-Security-Policty, see:

https://stackoverflow.com/questions/62810553
  • Loading branch information
moneromooo-monero committed Mar 18, 2021
1 parent ed4770a commit d5dff5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/webui-embed.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<!doctype html>
<html>
<script>
if (window.trustedTypes && window.trustedTypes.createPolicy) {
window.trustedTypes.createPolicy('default', {
createHTML: (string, sink) => string
});
}
</script>
<head>
<title>monero-pool</title>
<meta charset="utf-8">
Expand Down

0 comments on commit d5dff5d

Please sign in to comment.