From 7a4ee4dbc87ad31a09f0846f65e5c3f38522d69f Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 5 Sep 2025 16:20:00 +0000 Subject: [PATCH] apply ipr during login too (#397) --- copyparty/httpcli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 072c5962..8eaed03d 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -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)