From 75ef13b5d17795b835fe461e9be8080f3cf7d22b Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Sun, 9 Feb 2020 18:02:06 +0100 Subject: [PATCH] Replace content_security_policy_nonce with content_security_policy_script_nonce. To avoid an conflict with Rails, and to avoid confusing by twitter's gem overloading the method. --- app/views/conversations/new.mobile.haml | 2 +- app/views/layouts/_head.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/conversations/new.mobile.haml b/app/views/conversations/new.mobile.haml index d8e8feb04..fb8e6806f 100644 --- a/app/views/conversations/new.mobile.haml +++ b/app/views/conversations/new.mobile.haml @@ -2,7 +2,7 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -%script{nonce: content_security_policy_nonce(:script)} +%script{nonce: content_security_policy_script_nonce} :plain $(document).ready(function () { var data = $.parseJSON( "#{escape_javascript(@contacts_json).html_safe}" ), diff --git a/app/views/layouts/_head.haml b/app/views/layouts/_head.haml index a85a96c74..9b6b92f66 100644 --- a/app/views/layouts/_head.haml +++ b/app/views/layouts/_head.haml @@ -21,7 +21,7 @@ = stylesheet_link_tag :poltergeist_disable_transition, media: "all" = jquery_include_tag -= include_gon(camel_case: true, nonce: content_security_policy_nonce(:script)) += include_gon(camel_case: true, nonce: content_security_policy_script_nonce) = yield(:javascript) = csrf_meta_tag