Commit 64186170 by Syed Hassan Raza

accept data only if it is dict object

parent 24897124
......@@ -88,6 +88,9 @@ class SchoolYourselfReviewXBlock(SchoolYourselfXBlock):
that the signature is valid. If everything is good, then we'll
publish a "grade" event for this module.
"""
if not isinstance(data, dict):
return "bad request"
mastery = data.get("mastery", None)
user_id = data.get("user_id", None)
signature = data.get("signature", None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment