This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 9c1547e JAMES-3594 Decrease verbosity of bad credential auth failures
9c1547e is described below
commit 9c1547ef0f3c9343c5452fc0542bbcfa1770c49c
Author: Benoit Tellier <[email protected]>
AuthorDate: Fri Jun 11 16:06:10 2021 +0700
JAMES-3594 Decrease verbosity of bad credential auth failures
---
.../src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java
b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java
index 7356212..fc71578 100644
---
a/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java
+++
b/server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java
@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
import com.unboundid.ldap.sdk.BindResult;
import com.unboundid.ldap.sdk.DN;
+import com.unboundid.ldap.sdk.LDAPBindException;
import com.unboundid.ldap.sdk.LDAPConnectionPool;
import com.unboundid.ldap.sdk.ResultCode;
@@ -131,6 +132,9 @@ public class ReadOnlyLDAPUser implements User, Serializable
{
BindResult bindResult =
connectionPool.bindAndRevertAuthentication(userDN.toString(), password);
return bindResult.getResultCode() == ResultCode.SUCCESS;
} catch (Exception e) {
+ if (e instanceof LDAPBindException) {
+ LOGGER.info("Error binding LDAP for {}: {}",
userName.asString(), e.getMessage());
+ }
LOGGER.error("Unexpected error upon authentication", e);
return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]