Skip to content

Commit 0e600f3

Browse files
Magicbook1108clifftseng
authored andcommitted
Feat: Reject default admin account log in to normal services (infiniflow#11994)
### What problem does this PR solve? Feat: Reject default admin account log in to normal services infiniflow#11854 infiniflow#11673 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
1 parent 5f47db4 commit 0e600f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/apps/user_app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ async def login():
9898
return get_json_result(data=False, code=RetCode.AUTHENTICATION_ERROR, message="Unauthorized!")
9999

100100
email = json_body.get("email", "")
101+
if email == "admin@ragflow.io":
102+
return get_json_result(data=False, code=RetCode.AUTHENTICATION_ERROR, message="Default admin account cannot be used to login normal services!")
103+
101104
users = UserService.query(email=email)
102105
if not users:
103106
return get_json_result(

0 commit comments

Comments
 (0)