Added another sanity check

This commit is contained in:
Josh Sherman 2013-01-04 11:49:34 -05:00
parent d199a3ffc3
commit d329f92c31

View file

@ -6,7 +6,8 @@ class callback_github extends Module
public function __default()
{
if (isset($_SERVER['REMOTE_ADDR'], $_POST['payload'])
if (isset($_SERVER['HTTP_USER_AGENT'], $_SERVER['REMOTE_ADDR'], $_POST['payload'])
&& $_SERVER['HTTP_USER_AGENT'] == 'GitHub Services Web Hook'
&& in_array($_SERVER['REMOTE_ADDR'], array('207.97.227.253', '50.57.128.197', '108.171.174.178')))
{
`git pull origin master`;