stalary commented on code in PR #11948:
URL: https://github.com/apache/doris/pull/11948#discussion_r953285443


##########
fe/fe-core/src/main/java/org/apache/doris/ldap/LdapClient.java:
##########
@@ -132,20 +132,20 @@ public static boolean doesUserExist(String userName) {
         return true;
     }
 
-    public static boolean checkPassword(String userName, String password) {
+    boolean checkPassword(String userName, String password) {
         init();
         try {
             
clientInfo.getLdapTemplateNoPool().authenticate(org.springframework.ldap.query.LdapQueryBuilder.query()
                     .base(LdapConfig.ldap_user_basedn)
                     .filter(getUserFilter(LdapConfig.ldap_user_filter, 
userName)), password);
             return true;
-        } catch (Exception e) {
+        } catch (org.springframework.ldap.AuthenticationException e) {

Review Comment:
   The range captured here is small, which will result in doris being logged in 
without a password.



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to