# HG changeset patch # User Kim Alvefur # Date 1535114942 -7200 # Node ID 64d1dfbd1740458526c5a41e5f4d7dad2806e3e5 # Parent af73963cf1dd84b163e58c0f85200171dd4dc8d5 mod_pubsub_post: Ensure actor is non-nil (catch inability to determine IP or simliar) diff -r af73963cf1dd -r 64d1dfbd1740 mod_pubsub_post/mod_pubsub_post.lua --- a/mod_pubsub_post/mod_pubsub_post.lua Fri Aug 24 14:48:59 2018 +0200 +++ b/mod_pubsub_post/mod_pubsub_post.lua Fri Aug 24 14:49:02 2018 +0200 @@ -85,6 +85,10 @@ return 500; end + if not actor then + return 401; + end + if content_type == "application/xml" or content_type:sub(-4) == "+xml" then return handle_xml(path, actor, request.body); elseif content_type == "application/json" or content_type:sub(-5) == "+json" then