mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Stop request from being processed if bad ip
This commit is contained in:
parent
aa0c843553
commit
420817a963
1 changed files with 6 additions and 5 deletions
|
@ -634,11 +634,12 @@ def salt_ip_verify_tool():
|
|||
logger.debug("Request from IP: {0}".format(rem_ip))
|
||||
if rem_ip not in auth_ip_list:
|
||||
logger.error("Blocked IP: {0}".format(rem_ip))
|
||||
cherrypy.response.status = 403
|
||||
return {
|
||||
'status': cherrypy.response.status,
|
||||
'return': "Bad IP",
|
||||
}
|
||||
raise cherrypy.HTTPError(403, 'Bad IP')
|
||||
#cherrypy.response.status = 403
|
||||
#return {
|
||||
# 'status': cherrypy.response.status,
|
||||
# 'return': "Bad IP",
|
||||
#}
|
||||
|
||||
|
||||
def salt_auth_tool():
|
||||
|
|
Loading…
Add table
Reference in a new issue