Skip to content

Commit

Permalink
Merge pull request #2472 from internetee/renovate/rubygems-pdfkit-vul…
Browse files Browse the repository at this point in the history
…nerability

Update dependency pdfkit to v0.8.7.2 [SECURITY]
  • Loading branch information
OlegPhenomenon authored Nov 8, 2022
2 parents 1961b87 + f3b3eee commit 1c26cea
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ GEM
paper_trail (13.0.0)
activerecord (>= 5.2)
request_store (~> 1.1)
pdfkit (0.8.7)
pdfkit (0.8.7.2)
pg (1.4.4)
pg_query (2.1.2)
google-protobuf (>= 3.17.1)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/epp/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def respond_with_session_limit_exceeded_error(exception)
code: '2502',
msg: Shunter.default_error_message)
handle_errors
log_exception(exception)
log_exception(exception) unless Rails.env.test?
end

def respond_with_command_failed_error(exception)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/repp/v1/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def log_request
render(json: @response, status: :unauthorized)
rescue Shunter::ThrottleError => e
@response = { code: 2502, message: Shunter.default_error_message }
logger.error e.to_s
logger.error e.to_s unless Rails.env.test?
render(json: @response, status: :bad_request)
ensure
create_repp_log
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shunter/integration/throttle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def throttle
logger.info "Request from #{throttled_user.class}/#{throttled_user.id} is coming through throttling"
yield if block_given?
else
logger.info "Too many requests from #{throttled_user.class}/#{throttled_user.id}."
logger.info "Too many requests from #{throttled_user.class}/#{throttled_user.id}." unless Rails.env.test?
raise Shunter::ThrottleError
end
end
Expand Down
12 changes: 9 additions & 3 deletions test/models/epp/response/result/code_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
require 'test_helper'

class Hash
def contain?(other)
self.merge(other) == self
end
end

class EppResponseResultCodeTest < ActiveSupport::TestCase
def test_creates_code_by_key
key = :completed_successfully
Expand Down Expand Up @@ -84,10 +90,10 @@ def test_returns_default_descriptions
2306 => 'Parameter value policy error',
2308 => 'Data management policy violation',
2400 => 'Command failed',
2501 => 'Authentication error; server closing connection',
2502 => Shunter.default_error_message
2501 => 'Authentication error; server closing connection'
}
assert_equal descriptions, Epp::Response::Result::Code.default_descriptions

assert Epp::Response::Result::Code.default_descriptions.contain? descriptions
end

def test_equality
Expand Down

0 comments on commit 1c26cea

Please sign in to comment.