Changed 403 respones to 401s in RESTful API
parent
b56e5d29ec
commit
5e87f7d417
4
empire
4
empire
|
@ -209,9 +209,9 @@ def start_restful_api(startEmpire=False, suppress=False, username=None, password
|
||||||
if request.path != '/api/admin/login':
|
if request.path != '/api/admin/login':
|
||||||
token = request.args.get('token')
|
token = request.args.get('token')
|
||||||
if (not token) or (not tokenAllowed.match(token)):
|
if (not token) or (not tokenAllowed.match(token)):
|
||||||
return make_response('', 403)
|
return make_response('', 401)
|
||||||
if (token != apiToken) and (token != permanentApiToken):
|
if (token != apiToken) and (token != permanentApiToken):
|
||||||
return make_response('', 403)
|
return make_response('', 401)
|
||||||
|
|
||||||
|
|
||||||
@app.errorhandler(Exception)
|
@app.errorhandler(Exception)
|
||||||
|
|
Loading…
Reference in New Issue