From: Aki Tuomi Date: Fri, 19 Feb 2016 07:53:44 +0000 (+0200) Subject: It's name, not label. X-Git-Tag: auth-4.0.0-alpha2~30^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc015fba6517e55ae9b9f285353603baec3a53fb;p=thirdparty%2Fpdns.git It's name, not label. --- diff --git a/pdns/ws-api.cc b/pdns/ws-api.cc index a816b86256..e1e448a452 100644 --- a/pdns/ws-api.cc +++ b/pdns/ws-api.cc @@ -283,7 +283,7 @@ string apiZoneNameToId(const DNSName& dname) { return id; } -void apiCheckNameAllowedCharacters(const string& label) { - if (label.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_/.-") != std::string::npos) - throw ApiException("Label '"+label+"' contains unsupported characters"); +void apiCheckNameAllowedCharacters(const string& name) { + if (name.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_/.-") != std::string::npos) + throw ApiException("Name '"+name+"' contains unsupported characters"); } diff --git a/pdns/ws-api.hh b/pdns/ws-api.hh index 201cf07a8d..96c4ec6b40 100644 --- a/pdns/ws-api.hh +++ b/pdns/ws-api.hh @@ -34,7 +34,7 @@ void apiServerStatistics(HttpRequest* req, HttpResponse* resp); // helpers DNSName apiZoneIdToName(const string& id); string apiZoneNameToId(const DNSName& name); -void apiCheckNameAllowedCharacters(const string& label); +void apiCheckNameAllowedCharacters(const string& name); DNSName apiNameToDNSName(const string& name); // To be provided by product code.