# HG changeset patch # User Kim Alvefur # Date 1553978068 -3600 # Node ID 9ef5b229f73e9026838c3b5f17db1a457e9b134d # Parent 882180b459a023536a74c1663bf9e0c156b299f1 mod_pubsub_post: Make debug messages more informative diff -r 882180b459a0 -r 9ef5b229f73e mod_pubsub_post/mod_pubsub_post.lua --- a/mod_pubsub_post/mod_pubsub_post.lua Sat Mar 30 21:16:13 2019 +0100 +++ b/mod_pubsub_post/mod_pubsub_post.lua Sat Mar 30 21:34:28 2019 +0100 @@ -95,13 +95,15 @@ function handle_POST(event, path) local request = event.request; - module:log("debug", "Handling POST: \n%s\n", tostring(request.body)); local content_type = request.headers.content_type or "application/octet-stream"; local actor = actors and actors[path] or default_actor or request.ip; local secret = actor_secrets and actor_secrets[path] or default_secret; + module:log("debug", "Handling POST to node %q by %q with %q: \n%s\n", path, actor, content_type, request.body); + if secret and not verify_signature(secret, request.body, request.headers.x_hub_signature) then + module:log("debug", "Signature validation failed"); return 401; end