From 280a866186134d05a41b35986e967f1063b6e89c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 29 Jul 2017 13:09:57 +0200 Subject: util.pubsub: Don't record publisher when superuser privileges are used (eg by modules) --- util/pubsub.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/pubsub.lua b/util/pubsub.lua index 159b16f3..014aaa86 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -268,7 +268,9 @@ function service:publish(node, actor, id, item) node_obj = self.nodes[node]; end local node_data = self.data[node]; - item.attr.publisher = actor; + if type(actor) == "string" then + item.attr.publisher = actor; + end local ok = node_data:set(id, item); if not ok then return nil, "internal-server-error"; -- cgit v1.2.3