]> granicus.if.org Git - pdns/commitdiff
Check account existence
authorAki Tuomi <cmouse@cmouse.fi>
Wed, 20 Jan 2016 11:15:03 +0000 (13:15 +0200)
committerAki Tuomi <cmouse@cmouse.fi>
Wed, 20 Jan 2016 11:15:03 +0000 (13:15 +0200)
modules/remotebackend/httpconnector.cc

index 5ae2b2704bef79ccf7a898b883dbc426e978882b..9a8fdea1d2410cfb6017f23325d8c82acefbbfaf 100644 (file)
@@ -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();