From: Kees Monshouwer Date: Thu, 14 Jul 2022 16:11:04 +0000 (+0200) Subject: auth: limit unique lable length to 1 X-Git-Tag: auth-4.8.0-alpha0~7^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b842af59160ed65f00c064e632e018e56776bb69;p=thirdparty%2Fpdns.git auth: limit unique lable length to 1 --- 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()) {