panic if unknown users in ipu; closes #959

This commit is contained in:
ed 2025-11-19 23:28:39 +09:00
parent cad15fbf60
commit 79e1078671

View file

@ -1812,6 +1812,15 @@ class AuthSrv(object):
derive_args(self.args) derive_args(self.args)
self.setup_auth_ord() self.setup_auth_ord()
if self.args.ipu:
# syntax (CIDR=UNAME) is verified in load_ipu
zsl = [x.split("=", 1)[1] for x in self.args.ipu]
zsl = [x for x in zsl if x not in acct]
if zsl:
t = "ERROR: unknown users in ipu: %s" % (zsl,)
self.log(t, 1)
raise Exception(t)
self.setup_pwhash(acct) self.setup_pwhash(acct)
defpw = acct.copy() defpw = acct.copy()
self.setup_chpw(acct) self.setup_chpw(acct)