Merge remote-tracking branch 'origin/develop' into events

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-13 10:27:34 +02:00
commit 5ef9826060
4 changed files with 15 additions and 6 deletions

1
changelog.d/ldap-tls.fix Normal file
View file

@ -0,0 +1 @@
STARTTLS certificate and hostname verification for LDAP authentication

View file

@ -41,6 +41,7 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
port = Keyword.get(ldap, :port, 389)
ssl = Keyword.get(ldap, :ssl, false)
sslopts = Keyword.get(ldap, :sslopts, [])
tlsopts = Keyword.get(ldap, :tlsopts, [])
options =
[{:port, port}, {:ssl, ssl}, {:timeout, @connection_timeout}] ++
@ -54,7 +55,16 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
case :eldap.start_tls(
connection,
Keyword.get(ldap, :tlsopts, []),
Keyword.merge(
[
verify: :verify_peer,
cacerts: :certifi.cacerts(),
customize_hostname_check: [
fqdn_fun: fn _ -> to_charlist(host) end
]
],
tlsopts
),
@connection_timeout
) do
:ok ->

View file

@ -204,6 +204,7 @@ defmodule Pleroma.Mixfile do
{:oban_live_dashboard, "~> 0.1.1"},
{:multipart, "~> 0.4.0", optional: true},
{:argon2_elixir, "~> 4.0"},
{:certifi, "~> 2.12"},
{:icalendar, "~> 1.1"},
{:geospatial, "~> 0.3.1"},

View file

@ -42,7 +42,8 @@
},
"vcard": "http://www.w3.org/2006/vcard/ns#",
"formerRepresentations": "litepub:formerRepresentations",
<<<<<<< HEAD
"sm": "http://smithereen.software/ns#",
"nonAnonymous": "sm:nonAnonymous",
"mz": "https://joinmobilizon.org/ns#",
"joinMode": {
"@id": "mz:joinMode",
@ -65,10 +66,6 @@
"@id": "schema:location",
"@type": "schema:Place"
}
=======
"sm": "http://smithereen.software/ns#",
"nonAnonymous": "sm:nonAnonymous"
>>>>>>> origin/develop
}
]
}