From 7d8df324bca74ff75057edadfb8b1516bc7381e3 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 9 May 2011 14:31:10 +0000 Subject: [PATCH] Support multiple IP authorizations in ykval-revoke.php. --- Makefile | 2 +- NEWS | 4 ++++ ykval-revoke.php | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b283fbb..d89d60b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION = 2.8 +VERSION = 2.9 PACKAGE = yubikey-val CODE = COPYING Makefile NEWS ykval-checksum-clients.php \ ykval-common.php ykval-config.php ykval-db.php ykval-db.sql \ diff --git a/NEWS b/NEWS index b605f81..8cf3af7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +* Version 2.9 released 2011-05-09 + + * Support multiple IP authorizations in ykval-revoke.php. + * Version 2.8 released 2011-01-06 * Support YubiKey OTPs filtered through a US Dvorak keyboard layout. diff --git a/ykval-revoke.php b/ykval-revoke.php index d309848..e39b7b1 100644 --- a/ykval-revoke.php +++ b/ykval-revoke.php @@ -5,8 +5,8 @@ require_once 'ykval-db.php'; header("content-type: text/plain"); -if ($baseParams['__YKR_IP__'] != $_SERVER["REMOTE_ADDR"]) { - logdie("ERROR Authorization failed"); +if (!in_array ($_SERVER["REMOTE_ADDR"], $baseParams['__YKREV_IPS__'])) { + logdie("ERROR Authorization failed (logged ". $_SERVER["REMOTE_ADDR"] .")"); } # Parse input