mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-04-23 21:39:18 -04:00
Merge remote-tracking branch 'origin/develop' into events
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
commit
5ef9826060
4 changed files with 15 additions and 6 deletions
1
changelog.d/ldap-tls.fix
Normal file
1
changelog.d/ldap-tls.fix
Normal file
|
@ -0,0 +1 @@
|
|||
STARTTLS certificate and hostname verification for LDAP authentication
|
|
@ -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 ->
|
||||
|
|
1
mix.exs
1
mix.exs
|
@ -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"},
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue