Added another sanity check
This commit is contained in:
parent
d199a3ffc3
commit
d329f92c31
1 changed files with 2 additions and 1 deletions
|
@ -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`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue