Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rexml to 3.3.4 to address CVE-2024-39908, 41123, 41946 #5181

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion activemerchant.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_dependency('builder', '>= 2.1.2', '< 4.0.0')
s.add_dependency('i18n', '>= 0.6.9')
s.add_dependency('nokogiri', '~> 1.4')
s.add_dependency('rexml', '~> 3.2.5')
s.add_dependency('rexml', '~> 3.3', '>= 3.3.4')

s.add_development_dependency('mocha', '~> 1')
s.add_development_dependency('pry')
Expand Down
6 changes: 3 additions & 3 deletions test/unit/gateways/mercury_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_transcript_scrubbing

def successful_purchase_response
<<~RESPONSE
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult><?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult>
raymzag marked this conversation as resolved.
Show resolved Hide resolved
<RStream>
<CmdResponse>
<ResponseOrigin>Processor</ResponseOrigin>
Expand Down Expand Up @@ -163,7 +163,7 @@ def successful_purchase_response

def failed_purchase_response
<<~RESPONSE
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult><?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult>
<RStream>
<CmdResponse>
<ResponseOrigin>Server</ResponseOrigin>
Expand All @@ -179,7 +179,7 @@ def failed_purchase_response

def successful_refund_response
<<~RESPONSE
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult><?xml version="1.0"?>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreditTransactionResponse xmlns="http://www.mercurypay.com"><CreditTransactionResult>
<RStream>
<CmdResponse>
<ResponseOrigin>Processor</ResponseOrigin>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/gateways/paypal_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ def failed_create_profile_paypal_response
</CreateRecurringPaymentsProfileResponseDetails>
</CreateRecurringPaymentsProfileResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>"
raymzag marked this conversation as resolved.
Show resolved Hide resolved
</SOAP-ENV:Envelope>
RESPONSE
end

Expand Down
10 changes: 0 additions & 10 deletions test/unit/gateways/trans_first_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ def setup
@amount = 100
end

def test_missing_field_response
@gateway.stubs(:ssl_post).returns(missing_field_response)

response = @gateway.purchase(@amount, @credit_card, @options)

assert_failure response
assert response.test?
assert_equal 'Missing parameter: UserId.', response.message
Copy link
Contributor Author

@raymzag raymzag Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this test is not the right way to fix the tests, but this was added 17 years ago and I don't think it's still relevant. trans_first gateway seems no longer active as well, even if I want to fix this, there would be no doc to refer to.

image

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should remove Mercury and TransFirst completely in another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! these gateways are still active, you cannot remove them

end

def test_successful_purchase
@gateway.stubs(:ssl_post).returns(successful_purchase_response)

Expand Down
Loading