From 4acec8973f0073184943a5050e0b32791f617f50 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 21 Mar 2017 11:08:09 +0100 Subject: [PATCH] [WebProfilerBundle] Fix content-security-policy compatibility This fixes the compatibility of the bundle in case of a `style-src 'self'` policy. --- .../Resources/views/Profiler/toolbar.html.twig | 3 --- .../Resources/views/Profiler/toolbar_js.html.twig | 3 +++ .../Tests/Controller/ProfilerControllerTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig index 181e359fa3..a211617d72 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.html.twig @@ -4,9 +4,6 @@ {{ include('@WebProfiler/Icon/symfony.svg') }} - - {{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }} -
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig index ea038277c4..7dc541caae 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig @@ -1,5 +1,8 @@
{{ include('@WebProfiler/Profiler/base_js.html.twig') }} + + {{ include('@WebProfiler/Profiler/toolbar.css.twig', { 'position': position, 'floatable': true }) }} + /*getMockBuilder('Symfony\Bundle\WebProfilerBundle\Csp\NonceGenerator')->getMock(); - return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'normal', new ContentSecurityPolicyHandler($nonceGenerator)); + return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'bottom', new ContentSecurityPolicyHandler($nonceGenerator)); } - return new ProfilerController($urlGenerator, $profiler, $twig, array(), 'normal'); + return new ProfilerController($urlGenerator, $profiler, $twig, array()); } }