加固客户端凭据签发与撤销的本人密码验证
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-10-02 20:46:24 +08:00
1 parent 5523d9b327
commit e358396be5
6 files changed
+286 -68

No files matched your search

+15
View File
@@ -31,3 +31,18 @@ test('客户端授权码接口与界面能力保持一致', () => {
assert.match(template, /自动隐藏/)
assert.match(template, /撤销删除/)
})
test('客户端凭据操作验证本人密码且保留密码空白字符', () => {
const source = read('js')
const template = read('vue')
assert.match(template, /v-model="createPassword"/)
assert.match(template, /验证并生成/)
assert.match(source, /const password = createPassword\.value/)
assert.match(source, /const password = verifyPassword\.value/)
assert.doesNotMatch(source, /(?:createPassword|verifyPassword)\.value\.trim\(/)
assert.match(source, /client_name: name,\s+password,/)
assert.match(source, /openActionVerification\('regenerate', client\)/)
assert.match(source, /openActionVerification\('revoke', client\)/)
assert.match(source, /if \(verifyLoading\.value\) return/)
assert.match(source, /finally \{\s+verifyPassword\.value = ''/)
})