Fix in little things

This commit is contained in:
Antonio de la Rosa 2018-01-20 05:05:02 +01:00
parent ac11335aa0
commit dbf485fa1d
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -35,7 +35,8 @@
if(data.error==0)
{
window.location.href="${make_url('admin')}";
//window.location.href="${make_url('admin')}";
location.reload()
}
else