From fb4196851cc85f9b85ef81972515a1027bda7e50 Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Mon, 8 Nov 2021 20:32:56 +0200 Subject: [PATCH] Bugfix/Ruby 3.0 stdlib SMTP client SSL certificate verification issues * Updated Truemail::Validate::Smtp::Request#run * Updated development dependencies * Updated rubocop config * Updated gem version, changelog --- .rubocop.yml | 3 +++ CHANGELOG.md | 12 ++++++++++ Gemfile.lock | 34 +++++++++++++-------------- lib/truemail/validate/smtp/request.rb | 2 +- lib/truemail/version.rb | 2 +- truemail.gemspec | 10 ++++---- 6 files changed, 39 insertions(+), 24 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 1797b63..86cd490 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -404,6 +404,9 @@ Performance/RedundantSplitRegexpArgument: Performance/MapCompact: Enabled: true +Performance/ConcurrentMonotonicTime: + Enabled: true + RSpec/ExampleLength: Enabled: false diff --git a/CHANGELOG.md b/CHANGELOG.md index 86cca23..b1a0d68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.5.3] - 2021.11.08 + +### Fixed + +- Ruby 3.0 stdlib SMTP client SSL certificate verification issues for cases when IP address uses as MX host. Thanks [@esb](https://github.com/esb) for bug report. + +### Updated + +- Updated `Truemail::Validate::Smtp::Request#run` +- Updated gem development dependencies +- Updated gem version + ## [2.5.2] - 2021.10.06 ### Fixed diff --git a/Gemfile.lock b/Gemfile.lock index a6755c0..a206ef2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - truemail (2.5.2) + truemail (2.5.3) simpleidn (~> 0.2.1) GEM @@ -20,7 +20,7 @@ GEM crack (0.4.5) rexml diff-lcs (1.4.4) - dns_mock (1.4.2) + dns_mock (1.4.3) simpleidn (~> 0.2.1) docile (1.4.0) fasterer (0.9.0) @@ -29,7 +29,7 @@ GEM ffaker (2.20.0) hashdiff (1.0.1) iniparse (1.5.0) - json (2.5.1) + json (2.6.1) json_matchers (0.11.1) json_schema json_schema (0.21.0) @@ -69,8 +69,8 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-support (3.10.2) - rubocop (1.22.1) + rspec-support (3.10.3) + rubocop (1.22.3) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -79,17 +79,17 @@ GEM rubocop-ast (>= 1.12.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.12.0) + rubocop-ast (1.13.0) parser (>= 3.0.1.1) - rubocop-performance (1.11.5) + rubocop-performance (1.12.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rspec (2.5.0) + rubocop-rspec (2.6.0) rubocop (~> 1.19) ruby-progressbar (1.11.0) - ruby_parser (3.17.0) - sexp_processor (~> 4.15, >= 4.15.1) - sexp_processor (4.15.3) + ruby_parser (3.18.0) + sexp_processor (~> 4.16) + sexp_processor (4.16.0) simplecov (0.17.1) docile (~> 1.1) json (>= 1.8, < 3) @@ -115,9 +115,9 @@ PLATFORMS x86_64-darwin-20 DEPENDENCIES - bundler (~> 2.2, >= 2.2.28) + bundler (~> 2.2, >= 2.2.31) bundler-audit (~> 0.9.0.1) - dns_mock (~> 1.4, >= 1.4.2) + dns_mock (~> 1.4, >= 1.4.3) fasterer (~> 0.9.0) ffaker (~> 2.20) json_matchers (~> 0.11.1) @@ -126,13 +126,13 @@ DEPENDENCIES rake (~> 13.0, >= 13.0.6) reek (~> 6.0, >= 6.0.6) rspec (~> 3.10) - rubocop (~> 1.22, >= 1.22.1) - rubocop-performance (~> 1.11, >= 1.11.5) - rubocop-rspec (~> 2.5) + rubocop (~> 1.22, >= 1.22.3) + rubocop-performance (~> 1.12) + rubocop-rspec (~> 2.6) simplecov (~> 0.17.1) truemail! truemail-rspec (~> 0.7.0) webmock (~> 3.14) BUNDLED WITH - 2.2.28 + 2.2.31 diff --git a/lib/truemail/validate/smtp/request.rb b/lib/truemail/validate/smtp/request.rb index 6c416c9..f450ef5 100644 --- a/lib/truemail/validate/smtp/request.rb +++ b/lib/truemail/validate/smtp/request.rb @@ -35,7 +35,7 @@ def check_port end def run - session.start(configuration.verifier_domain) do |smtp_request| + session.start(configuration.verifier_domain, **(::RUBY_VERSION[/\A3\..+\z/] ? { tls_verify: false } : {})) do |smtp_request| response.connection = response.helo = true smtp_handshakes(smtp_request, response) end diff --git a/lib/truemail/version.rb b/lib/truemail/version.rb index 6bda452..b13682c 100644 --- a/lib/truemail/version.rb +++ b/lib/truemail/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Truemail - VERSION = '2.5.2' + VERSION = '2.5.3' end diff --git a/truemail.gemspec b/truemail.gemspec index e200255..e289f7e 100644 --- a/truemail.gemspec +++ b/truemail.gemspec @@ -33,9 +33,9 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'simpleidn', '~> 0.2.1' - spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.28' + spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.31' spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1' - spec.add_development_dependency 'dns_mock', '~> 1.4', '>= 1.4.2' + spec.add_development_dependency 'dns_mock', '~> 1.4', '>= 1.4.3' spec.add_development_dependency 'fasterer', '~> 0.9.0' spec.add_development_dependency 'ffaker', '~> 2.20' spec.add_development_dependency 'json_matchers', '~> 0.11.1' @@ -44,9 +44,9 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6' spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.6' spec.add_development_dependency 'rspec', '~> 3.10' - spec.add_development_dependency 'rubocop', '~> 1.22', '>= 1.22.1' - spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.5' - spec.add_development_dependency 'rubocop-rspec', '~> 2.5' + spec.add_development_dependency 'rubocop', '~> 1.22', '>= 1.22.3' + spec.add_development_dependency 'rubocop-performance', '~> 1.12' + spec.add_development_dependency 'rubocop-rspec', '~> 2.6' spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'truemail-rspec', '~> 0.7.0' spec.add_development_dependency 'webmock', '~> 3.14'