From cc015fba6517e55ae9b9f285353603baec3a53fb Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Fri, 19 Feb 2016 09:53:44 +0200 Subject: [PATCH] It's name, not label. --- pdns/ws-api.cc | 6 +++--- pdns/ws-api.hh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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. -- 2.47.2