mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
extra isinstance check
This commit is contained in:
parent
29e266f542
commit
cfc556f412
@ -91,7 +91,12 @@ class Plugin(BaseAuthService):
|
||||
attrlist=["memberOf"],
|
||||
timeout=self.__timeout,
|
||||
) or []):
|
||||
if dn is not None and isinstance(attrs, dict) and self.__group.encode() in attrs.get("memberOf"): # type: ignore
|
||||
if (
|
||||
dn is not None
|
||||
and isinstance(attrs, dict)
|
||||
and isinstance(attrs["memberOf"], (list, dict))
|
||||
and self.__group.encode() in attrs["memberOf"]
|
||||
):
|
||||
return True
|
||||
except ldap.INVALID_CREDENTIALS:
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user