From fb322fde2d5702c98c9469b63c63608e7ce27d9f Mon Sep 17 00:00:00 2001 From: missytake Date: Thu, 7 May 2026 15:08:02 +0200 Subject: [PATCH] fix(dns): address possible IndexError --- cmdeploy/src/cmdeploy/remote/rdns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/remote/rdns.py b/cmdeploy/src/cmdeploy/remote/rdns.py index af60e811..967a16d5 100644 --- a/cmdeploy/src/cmdeploy/remote/rdns.py +++ b/cmdeploy/src/cmdeploy/remote/rdns.py @@ -72,7 +72,7 @@ def get_authoritative_ns(domain): f"dig -r -q {domain} -t NS +noall +authority +answer", print=log_progress ).split("\n") ] - filtered_replies = [a for a in ns_replies if len(a) >= 3 and a[3] in ("SOA", "NS")] + filtered_replies = [a for a in ns_replies if len(a) >= 5 and a[3] in ("SOA", "NS")] if not filtered_replies: return return filtered_replies[0][4]