From a90356c6e78b35ca0581f9c98fced5e935f96f59 Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 4 May 2018 16:53:57 +0200 Subject: [PATCH] Automatically whitelist ".local" or ".local.", aka mDNS name (#1141) Closes #1138 --- sabnzbd/interface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sabnzbd/interface.py b/sabnzbd/interface.py index 07955af..48b5a5e 100644 --- a/sabnzbd/interface.py +++ b/sabnzbd/interface.py @@ -174,6 +174,11 @@ def check_hostname(): if host in cfg.host_whitelist(): return True + # Fine if ends with ".local" or ".local.", aka mDNS name + # See rfc6762 Multicast DNS + if host.endswith(('.local', '.local.')): + return True + # Ohoh, bad log_warning_and_ip(T('Refused connection with hostname "%s" from:') % host) return False