From 0802000d23b9b3b9d91953ba3e71a290a197a0b0 Mon Sep 17 00:00:00 2001 From: sarthurdev <965089+sarthurdev@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:31:08 +0200 Subject: firewall: T8991: Fix IndexError with domain resolver mishandling blank lines --- src/services/vyos-domain-resolver | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/services/vyos-domain-resolver b/src/services/vyos-domain-resolver index e1a52c93a..65b2a476b 100755 --- a/src/services/vyos-domain-resolver +++ b/src/services/vyos-domain-resolver @@ -166,13 +166,15 @@ def update_remote_group(config): for line in read_file(list_file).splitlines(): line_first_word = line.strip().partition(' ')[0] + if not line_first_word: + continue + if is_valid_ipv4_address_or_range(line_first_word): ip_list.append(line_first_word) elif is_valid_ipv6_address_or_range(line_first_word): ip6_list.append(line_first_word) - else: - if line_first_word[0].isalnum(): - invalid_list.append(line_first_word) + elif line_first_word[0].isalnum(): + invalid_list.append(line_first_word) # Load ip tables for table in ipv4_tables: -- cgit v1.2.3