Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/authorize_net/xml_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ def initialize(raw_response, transaction)
unless connection_failure?
begin
xml = Nokogiri::XML(@raw_response.body) do |config|
# confirm noent is the right flag
config.recover.noent.nonet
# Security: Do NOT use .noent - it enables entity substitution which allows XXE attacks.
# Predefined XML entities (&, <, etc.) are decoded by default without .noent.
config.recover.nonet
end
@root = xml.children[0]
@result_code = node_content_unless_nil(@root.at_css('messages resultCode'))
Expand Down