mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
FIX: POP3 doesn't work with TLS 1.3
This commit is contained in:
parent
f7ad87995d
commit
56c6e8e961
@ -34,7 +34,7 @@ module Jobs
|
||||
|
||||
if SiteSetting.pop3_polling_ssl
|
||||
if SiteSetting.pop3_polling_openssl_verify
|
||||
pop3.enable_ssl
|
||||
pop3.enable_ssl(max_version: OpenSSL::SSL::TLS1_2_VERSION)
|
||||
else
|
||||
pop3.enable_ssl(OpenSSL::SSL::VERIFY_NONE)
|
||||
end
|
||||
|
@ -37,7 +37,7 @@ task "emails:import" => :environment do
|
||||
|
||||
mails_left = 1
|
||||
pop3 = Net::POP3.new(address, port)
|
||||
pop3.enable_ssl if ssl
|
||||
pop3.enable_ssl(max_version: OpenSSL::SSL::TLS1_2_VERSION) if ssl
|
||||
|
||||
while mails_left > 0
|
||||
pop3.start(username, password) do |pop|
|
||||
|
Loading…
Reference in New Issue
Block a user