You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/03/22 02:07:53 UTC

[GitHub] [james-project] quantranhong1999 commented on a change in pull request #925: JAMES-3594 ReadOnlyLDAPUser adapt log message

quantranhong1999 commented on a change in pull request #925:
URL: https://github.com/apache/james-project/pull/925#discussion_r831707535



##########
File path: server/data/data-ldap/src/main/java/org/apache/james/user/ldap/ReadOnlyLDAPUser.java
##########
@@ -129,11 +129,11 @@ public boolean verifyPassword(String password) {
         try {
             BindResult bindResult = connectionPool.bindAndRevertAuthentication(userDN.toString(), password);
             return bindResult.getResultCode() == ResultCode.SUCCESS;
+        } catch (LDAPBindException e) {
+            LOGGER.info("Error binding LDAP for {}: {}", userName.asString(), e.getMessage());
+            return false;
         } catch (Exception e) {
-            if (e instanceof LDAPBindException) {
-                LOGGER.info("Error binding LDAP for {}: {}", userName.asString(), e.getMessage());
-            }
-            LOGGER.error("Unexpected error upon authentication", e);
+            LOGGER.error("Unexpected error upon authenticationfor {}", userName.asString(), e);

Review comment:
       `LOGGER.error("Unexpected error upon authentication for {}", userName.asString(), e);`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org