# HG changeset patch # User Matthew Wild # Date 1678552824 0 # Node ID 7eec2bc67c263e03d4ecc6e79a39746586d30c7d # Parent 0f943619e01a86c81a84730befb411b2d124210b mod_firewall: Warn about invalid pubsubitemid list specification diff -r 0f943619e01a -r 7eec2bc67c26 mod_firewall/definitions.lib.lua --- a/mod_firewall/definitions.lib.lua Sat Mar 11 16:40:09 2023 +0000 +++ b/mod_firewall/definitions.lib.lua Sat Mar 11 16:40:24 2023 +0000 @@ -198,6 +198,10 @@ pubsubitemid = { init = function(self, pubsub_spec, opts) local service_addr, node = pubsub_spec:match("^pubsubitemid:([^/]*)/(.*)"); + if not service_addr then + module:log("warn", "Invalid list specification (expected 'pubsubitemid:/', got: '%s')", pubsub_spec); + return; + end module:depends("pubsub_subscription"); module:add_item("pubsub-subscription", { service = service_addr;