Fix issues with the new GitHub post-commit hook handler.
Review Request #6318 — Created Sept. 12, 2014 and submitted
The new GitHub post-commit hook handler had some issues in production.
First, when adding the hook, GitHub would try to send a "ping" event,
which we did not support. This resulted in GitHub saying that the hook
wasn't functioning properly (though it wouldn't disable the hook).Second, and more importantly, the hook signature verification failed.
TheX-Hub-Signatureheader contained the prefix "sha1=", which the
handler wasn't expecting. It now looks for this, erroring out if it
doesn't find it.
New unit test changes pass. Haven't tried this in production yet.
- Change Summary:
-
Add a check for the number of items split out of the X-Hub-Signature header.
- Commit:
-
3d62fba7b41b383d7af99695cb5efd7fb1ea1a7e55ce8a27104c30f8d8e82813581ce37d38c71d00
Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/github.py reviewboard/hostingsvcs/tests.py Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/github.py reviewboard/hostingsvcs/tests.py