fix(mailer): drop the TLS 1.2 pin
The pin worked around a TLS 1.3 problem with Hackney on OTP 23 (swoosh/swoosh#478). Pleroma no longer supports OTP 23.
This commit is contained in:
parent
f4ff7cb1ea
commit
92a112cf15
4 changed files with 5 additions and 10 deletions
|
|
@ -36,11 +36,10 @@ defmodule Pleroma.Emails.Mailer do
|
||||||
def deliver(email, config \\ [])
|
def deliver(email, config \\ [])
|
||||||
|
|
||||||
def deliver(email, config) do
|
def deliver(email, config) do
|
||||||
# temporary hackney fix until hackney max_connections bug is fixed
|
# Swoosh HTTP adapters use Hackney, which otherwise trusts its certifi bundle
|
||||||
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|
|
||||||
email =
|
email =
|
||||||
Swoosh.Email.put_private(email, :hackney_options,
|
Swoosh.Email.put_private(email, :hackney_options,
|
||||||
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
|
ssl_options: Pleroma.HTTP.TLS.ssl_options()
|
||||||
)
|
)
|
||||||
|
|
||||||
case enabled?() do
|
case enabled?() do
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,6 @@ defmodule Pleroma.Emails.MailerTest do
|
||||||
assert_received {:email, %Swoosh.Email{private: %{hackney_options: hackney_options}}}
|
assert_received {:email, %Swoosh.Email{private: %{hackney_options: hackney_options}}}
|
||||||
|
|
||||||
assert hackney_options[:ssl_options] ==
|
assert hackney_options[:ssl_options] ==
|
||||||
Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
|
Pleroma.HTTP.TLS.ssl_options()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -531,10 +531,8 @@ defmodule Pleroma.UserTest do
|
||||||
ObanHelpers.perform_all()
|
ObanHelpers.perform_all()
|
||||||
|
|
||||||
Pleroma.Emails.UserEmail.account_confirmation_email(registered_user)
|
Pleroma.Emails.UserEmail.account_confirmation_email(registered_user)
|
||||||
# temporary hackney fix until hackney max_connections bug is fixed
|
|
||||||
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|
|
||||||
|> Swoosh.Email.put_private(:hackney_options,
|
|> Swoosh.Email.put_private(:hackney_options,
|
||||||
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
|
ssl_options: Pleroma.HTTP.TLS.ssl_options()
|
||||||
)
|
)
|
||||||
|> assert_email_sent()
|
|> assert_email_sent()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1042,10 +1042,8 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
ObanHelpers.perform_all()
|
ObanHelpers.perform_all()
|
||||||
|
|
||||||
Pleroma.Emails.UserEmail.account_confirmation_email(first_user)
|
Pleroma.Emails.UserEmail.account_confirmation_email(first_user)
|
||||||
# temporary hackney fix until hackney max_connections bug is fixed
|
|
||||||
# https://git.pleroma.social/pleroma/pleroma/-/issues/2101
|
|
||||||
|> Swoosh.Email.put_private(:hackney_options,
|
|> Swoosh.Email.put_private(:hackney_options,
|
||||||
ssl_options: Pleroma.HTTP.TLS.ssl_options(versions: [:"tlsv1.2"])
|
ssl_options: Pleroma.HTTP.TLS.ssl_options()
|
||||||
)
|
)
|
||||||
|> assert_email_sent()
|
|> assert_email_sent()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue