Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/global/form-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ const checkIllegal = (rule: any, value: any, callback: any) => {
value.indexOf("'") !== -1 ||
value.indexOf('`') !== -1 ||
value.indexOf('(') !== -1 ||
value.indexOf(')') !== -1
value.indexOf(')') !== -1 ||
value.indexOf("'") !== -1
) {
callback(new Error(i18n.global.t('commons.rule.illegalInput')));
} else {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/conn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<el-switch v-model="form.privilege" @change="onSaveAccess" />
<span class="input-help">{{ $t('database.remoteConnHelper') }}</span>
</el-form-item>
<el-form-item :label="$t('database.rootPassword')" :rules="Rules.requiredInput" prop="password">
<el-form-item :label="$t('database.rootPassword')" :rules="Rules.paramComplexity" prop="password">
<el-input type="password" show-password clearable v-model="form.password">
<template #append>
<el-button @click="onCopy(form.password)">{{ $t('commons.button.copy') }}</el-button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const form = reactive({
const rules = reactive({
name: [Rules.requiredInput, Rules.dbName],
username: [Rules.requiredInput, Rules.name],
password: [Rules.requiredInput],
password: [Rules.paramComplexity],
permission: [Rules.requiredSelect],
permissionIPs: [Rules.requiredInput],
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/database/mysql/password/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<el-form-item
:label="$t('commons.login.password')"
prop="password"
:rules="Rules.requiredInput"
:rules="Rules.paramComplexity"
>
<el-input
type="password"
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/database/redis/password/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<el-form @submit.prevent v-loading="loading" ref="formRef" :model="form" label-position="top">
<el-row type="flex" justify="center">
<el-col :span="22">
<el-form-item :label="$t('commons.login.password')" :rules="Rules.requiredInput" prop="password">
<el-form-item :label="$t('commons.login.password')" :rules="Rules.paramComplexity" prop="password">
<el-input type="password" show-password clearable v-model="form.password">
<template #append>
<el-button @click="onCopy(form.password)">{{ $t('commons.button.copy') }}</el-button>
Expand Down Expand Up @@ -73,6 +73,7 @@ const loading = ref(false);

const dialogVisiable = ref(false);
const form = ref<App.DatabaseConnInfo>({
privilege: false,
password: '',
serviceName: '',
port: 0,
Expand Down