diff --git a/paramecio/citoplasma/httputils.py b/paramecio/citoplasma/httputils.py index f825001..93ab337 100644 --- a/paramecio/citoplasma/httputils.py +++ b/paramecio/citoplasma/httputils.py @@ -109,6 +109,12 @@ class GetPostFiles: if self.post['csrf_token']!=s['csrf_token'] or self.post['csrf_token'].strip()=="": + # Clean csrf_token + + del s['csrf_token'] + + s.save() + #raise NameError('Error: you need a valid csrf_token') raise HTTPResponse(body=json.dumps({'error_csrf': 1, 'error': 1, 'token_invalid': 1}), status=200, headers={'Content-type': 'application/json'}) else: