소스 검색

enhance: limit password length #703

Jacky 8 달 전
부모
커밋
ff7938b90c
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      app/src/components/StdDesign/StdDataEntry/components/StdPassword.vue
  2. 4 0
      app/src/views/other/Install.vue

+ 2 - 0
app/src/components/StdDesign/StdDataEntry/components/StdPassword.vue

@@ -37,12 +37,14 @@ function handleGenerate() {
         v-model:value="modelValue"
         :class="{ compact: generate }"
         :placeholoder="placeholder"
+        :maxlength="20"
       />
       <AInput
         v-else
         v-model:value="modelValue"
         :class="{ compact: generate }"
         :placeholoder="placeholder"
+        :maxlength="20"
       />
       <AButton
         v-if="generate"

+ 4 - 0
app/src/views/other/Install.vue

@@ -43,6 +43,10 @@ const rulesRef = reactive({
       required: true,
       message: () => $gettext('Please input your password!'),
     },
+    {
+      max: 20,
+      message: () => $gettext('Password length cannot exceed 20 characters'),
+    },
   ],
   database: [
     {