Skip to content

Commit

Permalink
Coerce 'redirect-urls' to a list
Browse files Browse the repository at this point in the history
In the schema, this field is a list, so for safety I've coerced it into one here
  • Loading branch information
jonodrew committed Jun 21, 2024
1 parent e7f3c1b commit f08ea7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,8 @@ def new_client():
request_dict = request.form.to_dict()
user_domain = request_dict.get("owner").split("@")[1]
request_dict["owners"] = [request_dict.get("owner")]
redirect_urls = [url.strip() for url in request_dict.get("redirect_urls").split(",")]
request_dict["redirect_urls"] = redirect_urls
sso_oidc.save_client(
filename=f"{request_dict['app_url']}_{uuid.uuid4().hex}.json",
client={"secret": client_secret, "allowed_domains": [user_domain], **request_dict},
Expand Down

0 comments on commit f08ea7a

Please # to comment.