Skip to content

Commit

Permalink
Avoid parsing of XML requests with ; in the body
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 20, 2024
1 parent a44c189 commit 015a06c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/controllers/api/old_nodes_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_version
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)
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_version
# 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

Expand Down Expand Up @@ -482,5 +482,9 @@ def propagate_tags(node, old_node)
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
end

0 comments on commit 015a06c

Please sign in to comment.