Content-Security-Policy: sandbox directive: This directive is not supported in the Meta element #1771
-
Describe the problem/questionContent-Security-Policy: sandbox directive: This directive is not supported in the Meta element Did you use the FAQ section?
What you did?
What happensBrowser Warning in Debugging Tools What should happenHow to get rid of warning without lowering security? (given that the CSP meta tag is ignored, it was never applied in the first place) Issue reproducibilityNo, I cannot reproduce it on https://privatebin.net. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
First, this is a warning, not breaking anything. The stronger CSP policy as per the HTTP header should still be applied (including sandbox), but we decided to also send it in the meta tag, in case someone runs privatebin by accident on a server that strips the HTTP header or replaces it with a less strict one. Second, it should have stripped that part from the CSP in the meta tag, as we deal with that in: Lines 444 to 452 in 9a29894 I've just compared both patterns with the currently configured default CSP, but it seems to still match those and as you report, that part is correctly stripped on privatebin.net. If you had your reasons to change the default CSP, would you share those changes with us, if they would benefit other users of the project? Otherwise you'd have to change the pattern in the above code in your install to match your own policy. |
Beta Was this translation helpful? Give feedback.
First, this is a warning, not breaking anything. The stronger CSP policy as per the HTTP header should still be applied (including sandbox), but we decided to also send it in the meta tag, in case someone runs privatebin by accident on a server that strips the HTTP header or replaces it with a less strict one.
Second, it should have stripped that part from the CSP in the meta tag, as we deal with that in:
PrivateBin/lib/Controller.php
Lines 444 to 452 in 9a29894