From b842af59160ed65f00c064e632e018e56776bb69 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Thu, 14 Jul 2022 18:11:04 +0200 Subject: [PATCH] auth: limit unique lable length to 1 --- pdns/auth-catalogzone.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pdns/auth-catalogzone.cc b/pdns/auth-catalogzone.cc index 389acc1c71..16d6e893ac 100644 --- a/pdns/auth-catalogzone.cc +++ b/pdns/auth-catalogzone.cc @@ -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()) { -- 2.47.2