admin管理员组文章数量:1134248
I have a Content-Security-Policy for my Wordpress Website (LAMP-Server):
set Content-Security-Policy "base-uri 'self'; default-src 'self'; font-src 'self' data: ; frame-src ; img-src 'self' ; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline' ; object-src 'self'; form-action 'self'; frame-ancestors 'self';"
This CSP prevents me from activating any check box in Wordpress (either the check box that remembers my login or the check boxes that let me select which theme to update) (Tested with Firefox in Linux and Chrome on Android).
Without CSP everything works as expected.
Any hint on which CSP is required to make that work again is greatly appreciated.
I have a Content-Security-Policy for my Wordpress Website (LAMP-Server):
set Content-Security-Policy "base-uri 'self'; default-src 'self'; font-src 'self' data: https://fonts.gstatic.com; frame-src https://www.google.com https://www.youtube.com; img-src 'self' https://secure.gravatar.com; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; object-src 'self'; form-action 'self'; frame-ancestors 'self';"
This CSP prevents me from activating any check box in Wordpress (either the check box that remembers my login or the check boxes that let me select which theme to update) (Tested with Firefox in Linux and Chrome on Android).
Without CSP everything works as expected.
Any hint on which CSP is required to make that work again is greatly appreciated.
Share Improve this question asked Jan 23, 2022 at 11:00 UmbertonesUmbertones 112 bronze badges 2 |1 Answer
Reset to default 1Thanks to Jacob's hint I got the solution. This one is working.
Header set Content-Security-Policy "base-uri 'self'; default-src 'self'; font-src 'self' data: https://fonts.gstatic.com; frame-src https://www.google.com https://www.youtube.com; img-src data: 'self' https://secure.gravatar.com; script-src 'self' 'unsafe-inline' ; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; object-src 'self'; form-action 'self'; frame-ancestors 'self';"
The difference is the data:
in the ìmg-src
section.
本文标签: ContentSecurityPolicy blocks Wordpress check boxes from being activated
版权声明:本文标题:Content-Security-Policy blocks Wordpress check boxes from being activated 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736785292a1952824.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf data:image/svg+xml;utf8,%3Csvg%20xmlns%3… blockiert ("img-src").
Inimg src
self
is allowed..what am I missing here – Umbertones Commented Jan 23, 2022 at 19:27