Cleaning the csrf_token when was used
This commit is contained in:
parent
4149abcb36
commit
2d6f6da098
1 changed files with 6 additions and 0 deletions
|
|
@ -40,6 +40,12 @@ class GetPostFiles:
|
||||||
if GetPostFiles.post['csrf_token']!=s['csrf_token']:
|
if GetPostFiles.post['csrf_token']!=s['csrf_token']:
|
||||||
|
|
||||||
raise NameError('Error: you need a valid csrf_token')
|
raise NameError('Error: you need a valid csrf_token')
|
||||||
|
else:
|
||||||
|
#Clean csrf_token
|
||||||
|
|
||||||
|
s['csrf_token']=''
|
||||||
|
s.save()
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise NameError('Error: you don\'t send any valid csrf_token')
|
raise NameError('Error: you don\'t send any valid csrf_token')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue