From c1a295ca6e0472a2a5e4b845f0d60df8419d0508 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sat, 2 Jan 2016 19:55:35 +0100 Subject: [PATCH] Fix uncaught DNSName build error in DLNotifyHostHandler --- pdns/dynhandler.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 2a1ae34e6..1356b28ba 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -264,6 +264,13 @@ string DLNotifyHostHandler(const vector&parts, Utility::pid_t ppid) if(!::arg().mustDo("master")) return "PowerDNS not configured as master"; + DNSName domain; + try { + domain = DNSName(parts[1]); + } catch (...) { + return "Failed to parse domain as valid DNS name"; + } + try { ComboAddress ca(parts[2]); } catch(...) @@ -271,8 +278,8 @@ string DLNotifyHostHandler(const vector&parts, Utility::pid_t ppid) return "Unable to convert '"+parts[2]+"' to an IP address"; } - L<