# HG changeset patch # User Kim Alvefur # Date 1527982300 -7200 # Node ID 420391fd56e5b0015b9b5f84f9baf2782387a957 # Parent 3a6a48b83b4ff589449e083fe951ddfdb2e8b963 mod_slack_webhooks: Fix handling of form-urlencoded This had to be incorrect as there can’t be nested keys in urlencoded form data and the return value is treated as a table later diff -r 3a6a48b83b4f -r 420391fd56e5 mod_slack_webhooks/mod_slack_webhooks.lua --- a/mod_slack_webhooks/mod_slack_webhooks.lua Sat Jun 02 15:00:27 2018 +0200 +++ b/mod_slack_webhooks/mod_slack_webhooks.lua Sun Jun 03 01:31:40 2018 +0200 @@ -95,7 +95,7 @@ local body_type = headers.content_type; local post_body; if body_type == "application/x-www-form-urlencoded" then - post_body = formdecode(request.body)["payload"]; + post_body = formdecode(request.body); elseif body_type == "application/json" then if not pcall(function() post_body = json.decode(request.body) end) then return 420;