From 6efaa41969ab89c1e1bd468b1b895f6689b7f70d Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期四, 20 二月 2025 10:04:59 +0800 Subject: [PATCH] tmp --- app/api/auth.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/app/api/auth.py b/app/api/auth.py index da59d89..00b70be 100644 --- a/app/api/auth.py +++ b/app/api/auth.py @@ -176,6 +176,8 @@ @router.post("/v2/register", response_model=Response) async def register_v2(user: UserCreate, db=Depends(get_db)): + if "@" in user.username: + return Response(code=400, msg="Username cannot contain @") password = await password_rsa(user.password) if not is_valid_password(password): return Response(code=400, msg="The password must be at least 8 and contain both numbers and letters") -- Gitblit v1.8.0