From 46d1dc98cea72ead390de4dc75717d7964a61794 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 19 Jun 2014 17:20:43 -0400 Subject: [PATCH] Make absolutely sure to skip requests without a valid payload --- endpoints/trigger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index 8a844a13c..ab7aa9065 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -315,7 +315,7 @@ class GithubBuildTrigger(BuildTrigger): def handle_trigger_request(self, request, auth_token, config): payload = request.get_json() - if not payload or not 'head_commit' in payload: + if not payload or payload.get('head_commit') is None: raise SkipRequestException() if 'zen' in payload: