Skip to content

Commit

Permalink
fix(saas-signup): sanitize first name and last name
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Jun 29, 2024
1 parent d29dc35 commit de446f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions press/api/saas.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def account_request(
"""
return: Stripe setup intent and AR key if stripe flow, else None
"""
from frappe.utils import sanitize_html

email = email.strip().lower()
frappe.utils.validate_email_address(email, True)

Expand Down Expand Up @@ -61,8 +63,8 @@ def account_request(
"subdomain": subdomain,
"email": email,
"role": "Press Admin",
"first_name": first_name,
"last_name": last_name,
"first_name": sanitize_html(first_name),
"last_name": sanitize_html(last_name),
"country": country,
"url_args": url_args or json.dumps({}),
"send_email": True,
Expand Down

0 comments on commit de446f2

Please sign in to comment.