feat(dcauth): 移除机器码,改用纯设备码认证
- DCAuth 协议升级到 v2,签名原文只含设备码;客户端 2.0.0,旧版本返回 426 - 删除客户端机器码采集、后端 machine_code_* 字段与日志、后台机器码展示 - 102 迁移在生产执行前直接改为无机器码结构;SQL 守卫仅放行该文件 - Mock 短信不启用每日限额;修复慢电脑首次启动的协议转发竞态 - 新增 macOS DCAuth.app 打包脚本,注册 dcauth:// 协议,浏览器可直接唤起
This commit is contained in:
@@ -88,6 +88,12 @@ const checks: Array<{
|
||||
|
||||
const failures: string[] = []
|
||||
|
||||
// 生产尚未执行 102;按产品确认,允许在发布前移除其中的机器码字段。
|
||||
// 除此之外,所有历史迁移仍必须保持字节不变。
|
||||
const allowedHistoricalMigrationChanges = new Set([
|
||||
'M apps/backend/src/db/migrations/102_admin_phone_device_auth.sql',
|
||||
])
|
||||
|
||||
// 窗口总数会在 LIMIT/OFFSET 之前消费全部候选行;全后端 SQL 都禁止引入该写法。
|
||||
const countWindowPattern = /COUNT\s*\(\s*\*\s*\)\s*OVER\s*\(/i
|
||||
for (const file of listSourceFiles(path.join(BACKEND_ROOT, 'src'))) {
|
||||
@@ -113,6 +119,7 @@ try {
|
||||
.map((line) => line.trim().split(/\s+/))
|
||||
.filter(([status, file]) => status && file?.endsWith('.sql') && status !== 'A')
|
||||
.map(([status, file]) => `${status} ${file}`)
|
||||
.filter((change) => !allowedHistoricalMigrationChanges.has(change))
|
||||
if (changedHistoricalMigrations.length > 0) {
|
||||
failures.push(`历史迁移文件不可修改: ${changedHistoricalMigrations.join(', ')}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user