*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit a2f9d893 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Only accept a selected IdP if its ID is known

parent e94ff6c5
No related branches found
No related tags found
1 merge request!4Replace combobox implementation
......@@ -206,18 +206,19 @@ def get_index():
if request.method == "POST":
try:
chosen_idp_entity_id = request.form["idp_entity_id"]
query[return_param] = chosen_idp_entity_id
return_url = urllib.parse.urlunparse(
(
parse_result.scheme,
parse_result.netloc,
parse_result.path,
parse_result.params,
urllib.parse.urlencode(query),
parse_result.fragment,
if any((idp.entity_id == chosen_idp_entity_id for idp in available_idps)):
query[return_param] = chosen_idp_entity_id
return_url = urllib.parse.urlunparse(
(
parse_result.scheme,
parse_result.netloc,
parse_result.path,
parse_result.params,
urllib.parse.urlencode(query),
parse_result.fragment,
)
)
)
return redirect(return_url)
return redirect(return_url)
except KeyError:
# if the submission is invalid, show the form again
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment