summaryrefslogtreecommitdiff
path: root/www/cats/cats_import.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/cats/cats_import.php')
-rw-r--r--www/cats/cats_import.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/www/cats/cats_import.php b/www/cats/cats_import.php
index 9faa1e6..218e715 100644
--- a/www/cats/cats_import.php
+++ b/www/cats/cats_import.php
@@ -48,9 +48,9 @@ $access = FALSE;
if (
($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
- strlen(stristr($ssl_client_s_dn, '/emailAddress=cats@cacert.org')) > 0
+ // This should match the email element at the start, the end, or somewhere in the middle,
+ // and accept slashes (old convention) as well as commas (new convention) as delimiters
+ preg_match("/(^|,|\/)emailAddress=cats@cacert.org(,|\/|$)/", $ssl_client_s_dn)
) $access = TRUE;
if ($access !== TRUE) {