fix Email address certificate lookup
authorcommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>
Sun, 12 Jul 2009 04:02:38 +0000 (04:02 +0000)
committercommunity.cacert.org <community.cacert.org@d4452222-2f33-11de-9270-010000000000>
Sun, 12 Jul 2009 04:02:38 +0000 (04:02 +0000)
git-svn-id: http://svn.cacert.cl/Software/Voting/vote@66 d4452222-2f33-11de-9270-010000000000

database.php

index 0de7504..0948949 100644 (file)
@@ -117,13 +117,13 @@ BODY;
                        $stmt->execute(array($_SERVER['REMOTE_USER']));
                        $user = $stmt->fetch();
                        if ($user) return $user;
                        $stmt->execute(array($_SERVER['REMOTE_USER']));
                        $user = $stmt->fetch();
                        if ($user) return $user;
-                       if ($_SERVER['SSL_CLIENT_S_DN_EMAIL']) {
-                               $stmt->execute(array($_SERVER['SSL_CLIENT_S_DN_EMAIL']));
+                       if ($_SERVER['SSL_CLIENT_S_DN_Email']) {
+                               $stmt->execute(array($_SERVER['SSL_CLIENT_S_DN_Email']));
                                $user = $stmt->fetch();
                                if ($user) return $user;
                        }
                        $d=0;
                                $user = $stmt->fetch();
                                if ($user) return $user;
                        }
                        $d=0;
-                       while ($email=$_SERVER["SSL_CLIENT_S_DN_EMAIL_$d"]) {
+                       while ($email=$_SERVER["SSL_CLIENT_S_DN_Email_$d"]) {
                                $stmt->execute(array($email));
                                $user = $stmt->fetch();
                                if ($user) return $user;
                                $stmt->execute(array($email));
                                $user = $stmt->fetch();
                                if ($user) return $user;