fix: 修改密码校验正则表达式

pull/180/head
ssongliu 2023-03-01 19:11:51 +08:00 committed by ssongliu
parent 701da484c6
commit 651c269041
4 changed files with 7 additions and 7 deletions

View File

@ -96,8 +96,8 @@ func (u *CronjobService) HandleBackup(cronjob *model.Cronjob, startTime time.Tim
return "", err return "", err
} }
record.Type = "mysql" record.Type = "mysql"
record.Name = "mysql" record.Name = app.Name
record.DetailName = app.Name record.DetailName = cronjob.DBName
case "website": case "website":
fileName = fmt.Sprintf("website_%s_%s.tar.gz", cronjob.Website, startTime.Format("20060102150405")) fileName = fmt.Sprintf("website_%s_%s.tar.gz", cronjob.Website, startTime.Format("20060102150405"))
backupDir = fmt.Sprintf("%s/website/%s", localDir, cronjob.Website) backupDir = fmt.Sprintf("%s/website/%s", localDir, cronjob.Website)

View File

@ -19,7 +19,7 @@ const complexityPassword = (rule: any, value: any, callback: any) => {
if (value === '' || typeof value === 'undefined' || value == null) { if (value === '' || typeof value === 'undefined' || value == null) {
callback(new Error(i18n.global.t('commons.rule.complexityPassword'))); callback(new Error(i18n.global.t('commons.rule.complexityPassword')));
} else { } else {
const reg = /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*.-_])[\da-zA-Z~!@#$%^&*.-_]{8,}$/; const reg = /^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,30}$/;
if (!reg.test(value) && value !== '') { if (!reg.test(value) && value !== '') {
callback(new Error(i18n.global.t('commons.rule.complexityPassword'))); callback(new Error(i18n.global.t('commons.rule.complexityPassword')));
} else { } else {

View File

@ -126,7 +126,7 @@ export default {
imageName: 'Support English, Chinese, numbers, :.-_, length 1-30', imageName: 'Support English, Chinese, numbers, :.-_, length 1-30',
volumeName: 'Support English, numbers, .-_, length 1-30', volumeName: 'Support English, numbers, .-_, length 1-30',
complexityPassword: complexityPassword:
'Please enter a password with more than 8 characters and must contain letters, digits, and special symbols(~!@#$%^&*.-_)', 'Please enter a password with more than 8 characters and at least two combinations of letters, numbers, and special symbols',
commonPassword: 'Please enter a password with more than 6 characters', commonPassword: 'Please enter a password with more than 6 characters',
email: 'Email format error', email: 'Email format error',
number: 'Please enter the correct number', number: 'Please enter the correct number',
@ -734,7 +734,7 @@ export default {
panel: 'Panel', panel: 'Panel',
user: 'UserName', user: 'UserName',
userChange: 'Change username', userChange: 'Change username',
userChangeHelper: 'Change the user name and restart the service. Do you want to continue?', userChangeHelper: 'Change the user name to log out. Do you want to continue?',
passwd: 'Password', passwd: 'Password',
emailHelper: 'For password retrieval', emailHelper: 'For password retrieval',
title: 'Panel alias', title: 'Panel alias',

View File

@ -130,7 +130,7 @@ export default {
dbName: '.-_,1-16', dbName: '.-_,1-16',
imageName: ':.-_,1-30', imageName: ':.-_,1-30',
volumeName: '.-_,1-30', volumeName: '.-_,1-30',
complexityPassword: ' 8 (~!@#$%^&*.-_)', complexityPassword: ' 8 ',
commonPassword: ' 6 ', commonPassword: ' 6 ',
linuxName: '1-30{0}', linuxName: '1-30{0}',
email: '', email: '',
@ -740,7 +740,7 @@ export default {
panel: '', panel: '',
user: '', user: '',
userChange: '', userChange: '',
userChangeHelper: '', userChangeHelper: '退',
passwd: '', passwd: '',
emailHelper: '', emailHelper: '',
title: '', title: '',