fixed spaces and stuff getting into the level id
This commit is contained in:
parent
f333e1e53f
commit
816b168c72
@ -1,3 +1,4 @@
|
||||
import string
|
||||
import json
|
||||
|
||||
from django.contrib.auth.decorators import login_required
|
||||
@ -23,6 +24,7 @@ class CSRFexemptTemplateView(TemplateView):
|
||||
class LoadLevel(CSRFexemptTemplateView):
|
||||
def post(self, request, *args, **kwargs):
|
||||
level_id = request.POST.get("level_id")
|
||||
level_id = "".join(x for x in level_id if x in string.digits)
|
||||
if level_id is None or not level_id.isdigit():
|
||||
return HttpResponseBadRequest()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user