Skip to content

Commit 28a5e4b

Browse files
author
Rob Myers
committed
Prevent requests for licenses with malformed query parameters raising an exception.
1 parent fdd613f commit 28a5e4b

File tree

1 file changed

+4
-0
lines changed
  • python_env/src/cc.engine/cc/engine/chooser

1 file changed

+4
-0
lines changed

python_env/src/cc.engine/cc/engine/chooser/views.py

+4
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ def choose_results_view(request):
343343
# Select a license based on the request form
344344
license = _issue_license(request_form)
345345

346+
# If the request didn't have all the required information, we have no license
347+
if not license:
348+
return exc.HTTPBadRequest('Could not determine license from parameters.')
349+
346350
# If the license is retired, redirect to info page
347351
if license.deprecated:
348352
# Special case: PDCC should redirect to /publicdomain/

0 commit comments

Comments
 (0)