Skip to content

Commit

Permalink
add ip trusted file
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcj committed Nov 19, 2019
1 parent d53eee0 commit c2f0e58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webssh/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,10 @@ def post(self):

logging.info('Client>>>> on {}:{} now time {}'.format(x_real_ip, port,now))

if check_remote_ip_trusted(x_real_ip):
if self.check_remote_ip_trusted(x_real_ip):
logging.info('Client {}:{} in trusted list; now time {}'.format(x_real_ip, port,now))
else:
if check_remote_ip_blacklist(x_real_ip):
if self.check_remote_ip_blacklist(x_real_ip):
raise tornado.web.HTTPError(403, 'IP in blacklist.')

if client_ip != x_real_ip:
Expand Down

0 comments on commit c2f0e58

Please sign in to comment.