RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix: safe argument guard and remove redundant redis call (#14060)
Paul Y Huia0efc453f383
diff --git a/api/apps/restful_apis/user_api.py b/api/apps/restful_apis/user_api.pyindex 714453ac6f..7ae99163d8 100644--- a/api/apps/restful_apis/user_api.py+++ b/api/apps/restful_apis/user_api.py@@ -806,15 +806,15 @@ async def forget_reset_password():new_pwd = req.get("new_password")new_pwd2 = req.get("confirm_new_password")- new_pwd_base64 = decrypt(new_pwd)- new_pwd_string = base64.b64decode(new_pwd_base64).decode('utf-8')- new_pwd2_string = base64.b64decode(decrypt(new_pwd2)).decode('utf-8')+ if not all([email, new_pwd, new_pwd2]):+ return get_json_result(data=False, code=RetCode.ARGUMENT_ERROR, message="email and passwords are required")if not REDIS_CONN.get(_verified_key(email)):return get_json_result(data=False, code=RetCode.AUTHENTICATION_ERROR, message="email not verified")- if not all([email, new_pwd, new_pwd2]):- return get_json_result(data=False, code=RetCode.ARGUMENT_ERROR, message="email and passwords are required")+ new_pwd_base64 = decrypt(new_pwd)+ new_pwd_string = base64.b64decode(new_pwd_base64).decode('utf-8')+ new_pwd2_string = base64.b64decode(decrypt(new_pwd2)).decode('utf-8')if new_pwd_string != new_pwd2_string:return get_json_result(data=False, code=RetCode.ARGUMENT_ERROR, message="passwords do not match")