bug 893: Also add the check for the revocation date to the non-CCA version
authorMichael Tänzer <neo@nhng.de>
Wed, 31 Jul 2013 19:25:45 +0000 (21:25 +0200)
committerMichael Tänzer <neo@nhng.de>
Wed, 31 Jul 2013 19:25:45 +0000 (21:25 +0200)
of check_*_cert_running()

Signed-off-by: Michael Tänzer <neo@nhng.de>
includes/notary.inc.php

index 3de0b09..63aa40e 100644 (file)
                // called from includes/account.php     if($oldid == 50 && $process != "")
                $uid = intval($uid);
                if (0==$cca) {
-                       $query1 = "select 1 from `emailcerts` where `memid`='$uid' and `expire`>NOW()";
+                       $query1 = "select 1 from `emailcerts` where `memid`='$uid' and `expire`>NOW() and `revoked`<`created`";
                        $query2 = "select 1 from `emailcerts` where `memid`='$uid' and `revoked`>NOW()";
                }else{
                        $query1 = "select 1 from `emailcerts` where `memid`='$uid' and `expire`>(NOW()-90*86400)  and `revoked`<`created`";
                // called from includes/account.php     if($oldid == 50 && $process != "")
                $uid = intval($uid);
                if (0==$cca) {
-                       $query1 = "select 1 from `domaincerts` where `memid`='$uid' and `expire`>NOW()";
+                       $query1 = "select 1 from `domaincerts` where `memid`='$uid' and `expire`>NOW() and `revoked`<`created`";
                        $query2 = "select 1 from `domaincerts` where `memid`='$uid' and `revoked`>NOW()";
                }else{
                        $query1 = "select 1 from `domaincerts` where `memid`='$uid' and `expire`>(NOW()-90*86400)  and `revoked`<`created`";