Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Encode invitee email in the invitation link (#10842)

Rhys6f4885d86dc6
diff --git a/api/controllers/console/workspace/members.py b/api/controllers/console/workspace/members.py
index 8f694c65e0d..38ed2316a58 100644
--- a/api/controllers/console/workspace/members.py
+++ b/api/controllers/console/workspace/members.py
@@ -1,3 +1,5 @@
+from urllib import parse
+
from flask_login import current_user
from flask_restful import Resource, abort, marshal_with, reqparse
@@ -57,11 +59,12 @@ class MemberInviteEmailApi(Resource):
token = RegisterService.invite_new_member(
inviter.current_tenant, invitee_email, interface_language, role=invitee_role, inviter=inviter
)
+ encoded_invitee_email = parse.quote(invitee_email)
invitation_results.append(
{
"status": "success",
"email": invitee_email,
- "url": f"{console_web_url}/activate?email={invitee_email}&token={token}",
+ "url": f"{console_web_url}/activate?email={encoded_invitee_email}&token={token}",
}
)
except AccountAlreadyInTenantError: