From d8e713ad51d93e221f711cab1396d7e1ce2a4393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 17 May 2021 11:59:54 +0200 Subject: [PATCH] Imported dns.reversename (not imported before) for IP Authenticator reverse resolution --- server/src/uds/auths/InternalDB/authenticator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/uds/auths/InternalDB/authenticator.py b/server/src/uds/auths/InternalDB/authenticator.py index 297071b4..faa793a2 100644 --- a/server/src/uds/auths/InternalDB/authenticator.py +++ b/server/src/uds/auths/InternalDB/authenticator.py @@ -36,6 +36,7 @@ import logging import typing import dns.resolver +import dns.reversename from django.utils.translation import ugettext_noop as _ from uds.core import auths @@ -87,7 +88,7 @@ class InternalDBAuth(auths.Authenticator): try: usr = auth.users.get(name=username, state=State.ACTIVE) parent = usr.uuid - usr.id = usr.uuid = None # Empty "key" fields for replication + usr.id = usr.uuid = None # type: ignore # Empty id if usr.real_name.strip() == '': usr.real_name = usr.name usr.name = newUsername