Fix in little things
This commit is contained in:
parent
ac11335aa0
commit
dbf485fa1d
2 changed files with 5 additions and 4 deletions
|
|
@ -107,7 +107,7 @@ class GetPostFiles:
|
|||
if self.post['csrf_token']!=s['csrf_token'] or self.post['csrf_token'].strip()=="":
|
||||
|
||||
#raise NameError('Error: you need a valid csrf_token')
|
||||
raise HTTPResponse(body=json.dumps({'error_csrf': 1, 'error': 1}), status=200, headers={'Content-type': 'application/json'})
|
||||
raise HTTPResponse(body=json.dumps({'error_csrf': 1, 'error': 1, 'token_invalid': 1}), status=200, headers={'Content-type': 'application/json'})
|
||||
else:
|
||||
#Clean csrf_token
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ class GetPostFiles:
|
|||
|
||||
else:
|
||||
#raise NameError('Error: you don\'t send any valid csrf_token')
|
||||
raise HTTPResponse(body=json.dumps({'error_csrf': 1, 'error': 1}), status=200, headers={'Content-type': 'application/json'})
|
||||
raise HTTPResponse(body=json.dumps({'error_csrf': 1, 'error': 1, 'token_invalid': 0}), status=200, headers={'Content-type': 'application/json'})
|
||||
|
||||
#Check post_token
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@
|
|||
if(data.error==0)
|
||||
{
|
||||
|
||||
window.location.href="${make_url('admin')}";
|
||||
//window.location.href="${make_url('admin')}";
|
||||
location.reload()
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue