From 05d2779922bb2c282fa42816042d2dabf45f4b39 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Mon, 2 Feb 2026 22:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=AF=86=E7=A0=81=20=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E8=A2=AB=E5=93=88=E5=B8=8C=E7=9A=84=E7=A9=BA=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=8D=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/api/UserApi.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/api/UserApi.ts b/server/api/UserApi.ts index a6c20e2..a7e40df 100644 --- a/server/api/UserApi.ts +++ b/server/api/UserApi.ts @@ -140,7 +140,12 @@ export default class UserApi extends BaseApi { }) // 注冊 this.registerEvent("User.register", (args, { deviceId }) => { - if (this.checkArgsMissing(args, ['nickname', 'password'])) return { + // 判断密码是否为空已经没有意义 + // 因为空字符的哈希值不为空 + // 后续会修缮关于注册的机制 + // 比如限制 IP, 需要邮箱 + // 虽然我知道这没有什么意义 + if (this.checkArgsEmpty(args, ['nickname'])) return { msg: "参数缺失", code: 400, }