]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth API: purge entire zone from cache, not just zone-level records
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 3 Dec 2021 12:45:34 +0000 (13:45 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Fri, 3 Dec 2021 12:52:26 +0000 (13:52 +0100)
pdns/ws-auth.cc

index 6d691264d29b652d0f1deb6101906552a0497db2..5172ac8d69d24b9ac0b575fe6bf490cd0d847d2e 100644 (file)
@@ -2270,7 +2270,8 @@ static void apiServerCacheFlush(HttpRequest* req, HttpResponse* resp) {
 
   DNSName canon = apiNameToDNSName(req->getvars["domain"]);
 
-  uint64_t count = purgeAuthCachesExact(canon);
+  // purge entire zone from cache, not just zone-level records.
+  uint64_t count = purgeAuthCaches(canon.toString() + "$");
   resp->setJsonBody(Json::object {
       { "count", (int) count },
       { "result", "Flushed cache." }