From d3e18b7a3871609599daa87e83667dc3cc74dd49 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 19 Oct 2008 22:17:09 +0000 Subject: [PATCH] Added secondary IP address --- www/cats/cats_import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/cats/cats_import.php b/www/cats/cats_import.php index acc58c2..6d77a75 100644 --- a/www/cats/cats_import.php +++ b/www/cats/cats_import.php @@ -30,6 +30,7 @@ function sanitize_string($buffer) { define ('UNDEFINED', 'nd'); define ('ALLOWED_IP', '213.154.225.228'); +define ('ALLOWED_IP2', '193.238.157.112'); define ('CONFIG_FILEPATH', '/www/'); $remote_addr = (isset($_SERVER['REMOTE_ADDR']))?$_SERVER['REMOTE_ADDR']:UNDEFINED; @@ -41,7 +42,7 @@ $access = FALSE; // Access only from CATS.cacert.org with a client certificate for cats@cacert.org if ( - $remote_addr == ALLOWED_IP && + ($remote_addr == ALLOWED_IP || $remote_addr == ALLOWED_IP2) && $https == 'on' && // Comment (to be romeved): better to use preg_match matching the end of the line (since this is on the end of the line right?) // Ted: Is this specified? I don't think so, therefore I'd keep stristr