]> granicus.if.org Git - pdns/commitdiff
It's name, not label.
authorAki Tuomi <cmouse@desteem.org>
Fri, 19 Feb 2016 07:53:44 +0000 (09:53 +0200)
committerAki Tuomi <cmouse@desteem.org>
Fri, 19 Feb 2016 07:53:44 +0000 (09:53 +0200)
pdns/ws-api.cc
pdns/ws-api.hh

index a816b86256a53e571c801abc86369c7bf55d93dc..e1e448a4524858a30ea6e5d721169ce0272893c0 100644 (file)
@@ -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");
 }
index 201cf07a8d9a489fcd1abd88afc952edf01be415..96c4ec6b40639cb478b643bacdaee659d143d4c0 100644 (file)
@@ -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.