]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: limit unique lable length to 1
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 14 Jul 2022 16:11:04 +0000 (18:11 +0200)
committermind04 <mind04@monshouwer.org>
Thu, 14 Jul 2022 16:56:17 +0000 (18:56 +0200)
pdns/auth-catalogzone.cc

index 389acc1c7181f6ded055cee068ebbccf470bbb26..16d6e893ac2f5683fb58d52655c87dfa63a7f28d 100644 (file)
@@ -87,6 +87,9 @@ std::string CatalogInfo::toJson() const
     object["coo"] = d_coo.toString();
   }
   if (!d_unique.empty()) {
+    if (d_unique.countLabels() > 1) {
+      throw std::out_of_range("Multiple labels in a unique value are not allowed");
+    }
     object["unique"] = d_unique.toString();
   }
   if (!d_group.empty()) {