Update connection.py to force FQDN

main
mpgn 2023-07-04 10:19:39 +02:00 committed by GitHub
parent ab692c5b9e
commit 72b51d0016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -262,6 +262,9 @@ class connection(object):
else:
domain_single = self.args.domain if hasattr(self.args, "domain") and self.args.domain else self.domain
username_single = line
if "." not in domain_single:
self.logger.error(f"Domain {domain_single} for user {username_single.rstrip()} need to be FQDN ex:domain.local, not domain")
else:
domain.append(domain_single)
username.append(username_single.strip())
owned.append(False)
@ -271,6 +274,9 @@ class connection(object):
else:
domain_single = self.args.domain if hasattr(self.args, "domain") and self.args.domain else self.domain
username_single = user
if "." not in domain_single:
self.logger.error(f"Domain {domain_single} for user {username_single} need to be FQDN ex:domain.local, not domain")
else:
domain.append(domain_single)
username.append(username_single)
owned.append(False)