Skip to content

Commit

Permalink
storaged: Make Content-Security-Policy stricter
Browse files Browse the repository at this point in the history
We haven't yet implemented all the style fixes for the security
policy, but we can lock down the code at this point.

Closes #4020
  • Loading branch information
stefwalter committed Mar 16, 2016
1 parent db68753 commit 93a47a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
5 changes: 3 additions & 2 deletions pkg/storaged/devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
*/

define([
require([
"jquery",
"base1/cockpit",
"storage/client",
Expand All @@ -26,6 +26,7 @@ define([
"storage/details",
"storage/utils",
"translated!base1/po",
"base1/bootstrap-select",
], function($, cockpit, client, jobs, overview, details, utils, po) {
cockpit.locale(po);
var _ = cockpit.gettext;
Expand Down Expand Up @@ -116,5 +117,5 @@ define([
});
}

return init;
$(init);
});
12 changes: 3 additions & 9 deletions pkg/storaged/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@
<script src="../system/bundle.js"></script>
<script src="../shell/shell.js"></script>
<script src="bundle.js"></script>
<script>
require([
"jquery",
"storage/devices",
"base1/bootstrap-select",
], function($, devices) {
$(devices);
});
</script>
<!-- debug:start -->
<script src="devices.js"></script>
<!-- debug:end -->
</head>
<body hidden>

Expand Down
2 changes: 1 addition & 1 deletion pkg/storaged/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
}
},

"content-security-policy": "default-src 'self' 'unsafe-inline' 'unsafe-eval'"
"content-security-policy": "style-src 'self' 'unsafe-inline' 'unsafe-eval'"
}

0 comments on commit 93a47a4

Please sign in to comment.