From 53467d87752f0414903bb7738e20345661e4cf4f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 20 Dec 2024 10:18:12 +0000 Subject: [PATCH] Avoid parsing of XML requests with ; in the body --- test/integration/node_versions_test.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration/node_versions_test.rb b/test/integration/node_versions_test.rb index 71251aae9..4d8a705cb 100644 --- a/test/integration/node_versions_test.rb +++ b/test/integration/node_versions_test.rb @@ -15,7 +15,7 @@ class NodeVersionsTest < ActionDispatch::IntegrationTest propagate_tags(node, node.old_nodes.last) ## First try this with a non-public user - auth_header = bearer_authorization_header private_user + auth_header = request_headers private_user # setup a simple XML node xml_doc = xml_for_node(private_node) @@ -62,7 +62,7 @@ class NodeVersionsTest < ActionDispatch::IntegrationTest # probably should check that they didn't get written to the database ## Now do it with the public user - auth_header = bearer_authorization_header user + auth_header = request_headers user # setup a simple XML node @@ -191,4 +191,8 @@ class NodeVersionsTest < ActionDispatch::IntegrationTest create(:old_node_tag, :old_node => old_node, :k => k, :v => v) end end + + def request_headers(user) + bearer_authorization_header(user).merge("Content-Type" => "application/xml") + end end -- 2.39.5