From 8d3e0f7699b2b7d069c1297f92eda0a559676638 Mon Sep 17 00:00:00 2001 From: majestick Date: Tue, 23 Jul 2013 09:42:54 +0200 Subject: [PATCH] fixed regex and config path --- ns_revoke_query.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ns_revoke_query.php b/ns_revoke_query.php index 6473bf3..0b9ebd5 100644 --- a/ns_revoke_query.php +++ b/ns_revoke_query.php @@ -14,13 +14,17 @@ # application/x-netscape-revocation containing a single character # '1' if the certificate is revoked, '0' if it is valid. # -include('./config.in.php'); +include('./config.php'); include(STORE_DIR.'/config/config.php'); $serial = escapeshellcmd(trim($_SERVER['QUERY_STRING'])); -header("Content-type: application/x-netscape-revocation"); -$regexp = "^R\t.*\t.*\t$serial\t.*\t.*$"; -if (exec("egrep '$regexp' ca/$config[index]")) +#header("Content-type: application/x-netscape-revocation"); + +# old Reg Ex doesnt work, new should do the work +#$regexp = "^R\t.*\t.*\t$serial\t.*\t.*$"; +$regexp = "^R.*$serial.*$"; + +if (exec("egrep '$regexp' $config[index]")) print '1'; else print '0';