Skip to content

Commit

Permalink
check domain for trailing dot
Browse files Browse the repository at this point in the history
having a trailing dot in domainname is a common Copy&Paste error but generates wrong config files

Signed-off-by: Blackyfff <[email protected]>
  • Loading branch information
Blackyfff committed Jan 25, 2021
1 parent 898eb44 commit 39c74d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions check
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ def do_checks(srcdir):
errcnt += check_rdns(data)
for domain in data.get('domains', []):
errcnt += check_dupe("Domain", domain.upper(), domains, community)
if domain.endswith( '.' ):
errcnt += 1
error("Domain ends with .: %s" % (domain))
try:
domain.encode("ascii").decode("idna")
except (UnicodeEncodeError, UnicodeError):
Expand Down

0 comments on commit 39c74d5

Please sign in to comment.