commit: 19eeea7c121426b2ee356a5b5d9d5bd2e8ada025
parent ef2ada59e0b4a1b203b6edd1969518f63bf5eff5
Author: feld <feld@feld.me>
Date: Fri, 12 Jul 2024 14:25:49 +0000
Merge branch 'develop' into 'develop'
LDAP Authenticator: Improve error reporting.
See merge request pleroma/pleroma!4171
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/changelog.d/ldap-error-logging.change b/changelog.d/ldap-error-logging.change
@@ -0,0 +1 @@
+Improve error logging when LDAP authentication fails.
diff --git a/lib/pleroma/web/auth/ldap_authenticator.ex b/lib/pleroma/web/auth/ldap_authenticator.ex
@@ -91,7 +91,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
end
error ->
- error
+ Logger.error("Could not bind LDAP user #{name}: #{inspect(error)}")
+ {:error, {:ldap_bind_error, error}}
end
end
@@ -111,7 +112,8 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
try_register(name, attributes)
error ->
- error
+ Logger.error("Couldn't register user because LDAP search failed: #{inspect(error)}")
+ {:error, {:ldap_search_error, error}}
end
end