Skip to content

Commit

Permalink
fix: 修改安全入口长度校验 (1Panel-dev#4594)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed Apr 19, 2024
1 parent 25608e7 commit e79a5f9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ const message = {
showEntrance: 'Enable Home Page Notification Not Enabled',
entranceHelper: 'Enabling secure entry will only allow logging in to the panel through specified secure entry.',
entranceError:
'Please enter a secure login entry point of 6-10 characters, only numbers or letters are supported.',
'Please enter a secure login entry point of 5-116 characters, only numbers or letters are supported.',
entranceInputHelper: 'When the security entry is set to blank, the security entry is cancelled.',
randomGenerate: 'Random',
expirationTime: 'Expiration Time',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ const message = {
entrance: '安全入口',
showEntrance: '啟用概覽頁未開啟提醒',
entranceHelper: '開啟安全入口後只能通過指定安全入口登錄面板',
entranceError: '請輸入 6-10 位安全登錄入口僅支持輸入數字或字母',
entranceError: '請輸入 5-116 位安全登錄入口僅支持輸入數字或字母',
entranceInputHelper: '安全入口設置為空時則取消安全入口',
randomGenerate: '隨機生成',
expirationTime: '密碼過期時間',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ const message = {
entrance: '安全入口',
showEntrance: '启用概览页未开启提醒',
entranceHelper: '开启安全入口后只能通过指定安全入口登录面板',
entranceError: '请输入 6-10 位安全登录入口仅支持输入数字或字母',
entranceError: '请输入 5-116 位安全登录入口仅支持输入数字或字母',
entranceInputHelper: '安全入口设置为空时则取消安全入口',
randomGenerate: '随机生成',
expirationTime: '密码过期时间',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/setting/safe/entrance/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const rules = reactive({
function checkSecurityEntrance(rule: any, value: any, callback: any) {
if (form.securityEntrance !== '') {
const reg = /^[A-Za-z0-9]{6,10}$/;
const reg = /^[A-Za-z0-9]{5,116}$/;
if (!reg.test(form.securityEntrance)) {
return callback(new Error(i18n.global.t('setting.entranceError')));
}
Expand Down

0 comments on commit e79a5f9

Please sign in to comment.