Removed invalid characters from code in auth.py
This commit is contained in:
parent
f08622f208
commit
202ec3bebc
1 changed files with 4 additions and 4 deletions
|
|
@ -189,16 +189,16 @@ class LoginManager:
|
|||
def validate_ip_address(self):
|
||||
ip_list = webnotes.conn.get_value('Profile', self.user, 'restrict_ip', ignore=True)
|
||||
|
||||
if not ip_list:
|
||||
if not ip_list:
|
||||
return
|
||||
|
||||
ip_list = ip_list.replace(",", "\n").split('\n')
|
||||
ip_list = [i.strip() for i in ip_list]
|
||||
|
||||
for ip in ip_list:
|
||||
if webnotes.remote_ip.startswith(ip):
|
||||
for ip in ip_list:
|
||||
if webnotes.remote_ip.startswith(ip):
|
||||
return
|
||||
elif webnotes.form_dict.get('via_ip') and webnotes.form_dict.get('via_ip').startswith(ip):
|
||||
elif webnotes.form_dict.get('via_ip') and webnotes.form_dict.get('via_ip').startswith(ip):
|
||||
return
|
||||
|
||||
webnotes.msgprint('Not allowed from this IP Address', raise_exception=1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue