]> granicus.if.org Git - pdns/commitdiff
auth: Clear caches (meta-data, keys) on domain deletion
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 23 Jan 2019 08:38:42 +0000 (09:38 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 23 Jan 2019 08:40:06 +0000 (09:40 +0100)
pdns/ws-auth.cc

index 4ef6708339ed5bdc256a04a32e254de55f42831e..43fde3c9f8596ccc115f2d5fa16c49db3015f9dd 100644 (file)
@@ -1673,6 +1673,10 @@ static void apiServerZoneDetail(HttpRequest* req, HttpResponse* resp) {
     if(!di.backend->deleteDomain(zonename))
       throw ApiException("Deleting domain '"+zonename.toString()+"' failed: backend delete failed/unsupported");
 
+    // clear caches
+    DNSSECKeeper dk(&B);
+    dk.clearCaches(zonename);
+
     // empty body on success
     resp->body = "";
     resp->status = 204; // No Content: declare that the zone is gone now