From e15c7ece5b422ce8f646b4ec0b7d3b81c147994f Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 3 Jan 2019 21:55:21 +0000 Subject: [PATCH] URL-unquote form-encoded data AFTER parsing it as a query string (github.py) --- modules/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/github.py b/modules/github.py index 06fbdae6..4c7dae5d 100644 --- a/modules/github.py +++ b/modules/github.py @@ -38,8 +38,8 @@ class Module(ModuleManager.BaseModule): def github(self, event): payload = event["data"].decode("utf8") if event["headers"]["Content-Type"] == FORM_ENCODED: - payload = urllib.parse.parse_qs(urllib.parse.unquote(payload) - )["payload"][0] + payload = urllib.parse.unquote(urllib.parse.parse_qs(payload)[ + "payload"][0]) data = json.loads(payload) github_event = event["headers"]["X-GitHub-Event"]