mirror of
https://github.com/9001/copyparty.git
synced 2025-09-28 12:42:26 -06:00
apply ipr during login too (#397)
This commit is contained in:
parent
bd6d1f961d
commit
7a4ee4dbc8
|
@ -3064,6 +3064,11 @@ class HttpCli(object):
|
|||
uname = self.asrv.iacct.get(hpwd)
|
||||
if uname:
|
||||
pwd = self.asrv.ases.get(uname) or pwd
|
||||
if uname and self.conn.hsrv.ipr:
|
||||
znm = self.conn.hsrv.ipr.get(uname)
|
||||
if znm and not znm.map(self.ip):
|
||||
self.log("username [%s] rejected by --ipr" % (self.uname,), 3)
|
||||
uname = ""
|
||||
if uname:
|
||||
msg = "hi " + uname
|
||||
dur = int(60 * 60 * self.args.logout)
|
||||
|
|
Loading…
Reference in a new issue