GitHub: Allow new IP addresses used by GitHub for web hooks. Closes GH-130.

master
Valentin Lorentz 2013-06-12 04:03:57 +00:00
parent d7f89cc97f
commit 5b35f115bc
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ class GithubCallback(httpserver.SupyHTTPServerCallback):
def doPost(self, handler, path, form):
if not handler.address_string().endswith('.rs.github.com') and \
not handler.address_string().endswith('.cloud-ips.com') and \
not handler.address_string() == 'localhost':
not handler.address_string() == 'localhost' and \
not handler.address_string().startswith('192.30.252.') and \
not handler.address_string().startswith('204.232.175.'):
log.warning("""'%s' tried to act as a web hook for Github,
but is not GitHub.""" % handler.address_string())
self.send_response(403)