moduleapi: Stricter type check for actor in permission check
Non-table but truthy values would trigger "attempt to index a foo value"
on the next line otherwise
--- a/core/moduleapi.lua Wed Jul 20 13:07:04 2022 +0200
+++ b/core/moduleapi.lua Wed Jul 20 13:08:07 2022 +0200
@@ -645,7 +645,7 @@
end
local session = context.origin or context.session;
- if not session then
+ if type(session) ~= "table" then
error("Unable to identify actor session from context");
end
if session.type == "s2sin" or (session.type == "c2s" and session.host ~= self.host) then