From: Aki Tuomi Date: Wed, 20 Jan 2016 11:15:03 +0000 (+0200) Subject: Check account existence X-Git-Tag: dnsdist-1.0.0-alpha2~36^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9596fb4c7804acf3b292887bbf9cfab659e63363;p=pdns Check account existence --- diff --git a/modules/remotebackend/httpconnector.cc b/modules/remotebackend/httpconnector.cc index 5ae2b2704..9a8fdea1d 100644 --- a/modules/remotebackend/httpconnector.cc +++ b/modules/remotebackend/httpconnector.cc @@ -130,7 +130,7 @@ void HTTPConnector::restful_requestbuilder(const std::string &method, const Json } else if (method == "createSlaveDomain") { addUrlComponent(parameters, "ip", ss); addUrlComponent(parameters, "domain", ss); - if (parameters["account"].is_string()) { + if (parameters["account"].is_null() == false && parameters["account"].is_string()) { req.POST()["account"] = parameters["account"].string_value(); } req.preparePost();