Skip to content

[WebProfilerBundle] Toolbar loading should be refactored to avoid using eval() for more secure CSP #27588

@herndlm

Description

@herndlm

In https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig eval is used to evaluate embedded scripts, but this is the only place in Symfony it is needed. Refactoring this would get rid of eval and would allow users to use very strong, very secure Content-Security-Policies.
As noted in #27525 eval cannot be allowed via nonce and allowing it only when the profiler is active is not desirable because other violations may not be noticed because of it.

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