You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by gu...@apache.org on 2021/09/09 02:12:05 UTC

[pulsar-manager] branch master updated: The password can not be less than 6 digits (#414)

This is an automated email from the ASF dual-hosted git repository.

guangning pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-manager.git


The following commit(s) were added to refs/heads/master by this push:
     new 8032347  The password can not be less than 6 digits (#414)
8032347 is described below

commit 803234712e7906885f2765f72407b99398b0c154
Author: 郭中奇 <16...@users.noreply.github.com>
AuthorDate: Thu Sep 9 10:12:00 2021 +0800

    The password can not be less than 6 digits (#414)
    
    Fixes #413
    
    Master Issue: #413
    
    Describe the modifications you've done.
    
    When adding users to the /users/superuser interface, you need to add a password that is not less than 6 digits for verification, otherwise you cannot log in with a password less than 6 digits
---
 .../java/org/apache/pulsar/manager/service/impl/UsersServiceImpl.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main/java/org/apache/pulsar/manager/service/impl/UsersServiceImpl.java b/src/main/java/org/apache/pulsar/manager/service/impl/UsersServiceImpl.java
index 1a69575..75b1608 100644
--- a/src/main/java/org/apache/pulsar/manager/service/impl/UsersServiceImpl.java
+++ b/src/main/java/org/apache/pulsar/manager/service/impl/UsersServiceImpl.java
@@ -52,6 +52,10 @@ public class UsersServiceImpl implements UsersService {
             validateResult.put("error", "Fields password and access token cannot be empty at the same time.");
             return validateResult;
         }
+        if (userInfoEntity.getPassword().length() < 6) {
+            validateResult.put("error", "The password can not be less than 6 digits.");
+            return validateResult;
+        }
         validateResult.put("message", "Validate user success");
         return validateResult;
     }