URL-unquote form-encoded data AFTER parsing it as a query string (github.py)
This commit is contained in:
parent
498352d1ac
commit
e15c7ece5b
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
def github(self, event):
|
def github(self, event):
|
||||||
payload = event["data"].decode("utf8")
|
payload = event["data"].decode("utf8")
|
||||||
if event["headers"]["Content-Type"] == FORM_ENCODED:
|
if event["headers"]["Content-Type"] == FORM_ENCODED:
|
||||||
payload = urllib.parse.parse_qs(urllib.parse.unquote(payload)
|
payload = urllib.parse.unquote(urllib.parse.parse_qs(payload)[
|
||||||
)["payload"][0]
|
"payload"][0])
|
||||||
data = json.loads(payload)
|
data = json.loads(payload)
|
||||||
|
|
||||||
github_event = event["headers"]["X-GitHub-Event"]
|
github_event = event["headers"]["X-GitHub-Event"]
|
||||||
|
|
Loading…
Reference in a new issue