Skip to content

Make exception pages compatible with CSP #24772

Closed
@ostrolucky

Description

@ostrolucky
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version 4.0

Currently, we have to declare style-src 'self' 'unsafe-inline' just because of symfony's exception pages. Without that, it renders page completely messed up. What's worst is that it's not made obvious this is due to CSP, because it seemingly outputs something (just the text of Symfony exception), but nothing useful:

screenshot-2017-10-31 unable to find template app layout main html twig looked into var www templates var www vendor symf

Only when you scroll down you will see some huge fonts.

This is because it uses some <style> and <script> tags without nonce codes, unlike debug toolbar.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions