feat: 风险分定时衰减 + 密码提示修复 + 浏览器池API + next回跳
1. 风险分衰减定时任务: - services/scheduler.py: 每天 CST 04:00 自动执行 decay_scores() - 支持 RISK_SCORE_DECAY_TIME_CST 环境变量覆盖 2. 密码长度提示统一为8位: - app-frontend/src/pages/RegisterPage.vue - app-frontend/src/layouts/AppLayout.vue - admin-frontend/src/pages/SettingsPage.vue - templates/register.html 3. 浏览器池统计API: - GET /yuyx/api/browser_pool/stats - 返回 worker 状态、队列等待数等信息 - browser_pool_worker.py: 增强 get_stats() 方法 4. 登录后支持 next 参数回跳: - app-frontend/src/pages/LoginPage.vue: 检查 ?next= 参数 - 仅允许站内路径(防止开放重定向) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,14 @@ const username = ref('')
|
||||
const password = ref('')
|
||||
const submitting = ref(false)
|
||||
|
||||
function validateStrongPassword(value) {
|
||||
const text = String(value || '')
|
||||
if (text.length < 8) return { ok: false, message: '密码长度至少8位' }
|
||||
if (text.length > 128) return { ok: false, message: '密码长度不能超过128个字符' }
|
||||
if (!/[a-zA-Z]/.test(text) || !/\d/.test(text)) return { ok: false, message: '密码必须包含字母和数字' }
|
||||
return { ok: true, message: '' }
|
||||
}
|
||||
|
||||
async function relogin() {
|
||||
try {
|
||||
await logout()
|
||||
@@ -54,8 +62,9 @@ async function savePassword() {
|
||||
ElMessage.error('请输入新密码')
|
||||
return
|
||||
}
|
||||
if (value.length < 6) {
|
||||
ElMessage.error('密码至少6个字符')
|
||||
const check = validateStrongPassword(value)
|
||||
if (!check.ok) {
|
||||
ElMessage.error(check.message)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user