summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2013-08-06 23:37:47 +0200
committerMichael Tänzer <neo@nhng.de>2013-08-06 23:58:15 +0200
commit4193c98693d25611e2b99d975d70bd06e1417a95 (patch)
treeb97e6c849ed22f83abed7ab1474b60e6161d2e6f /includes
parent6744dcf1b1ce1da56498d25e837ceebc693a0bc1 (diff)
downloadcacert-devel-4193c98693d25611e2b99d975d70bd06e1417a95.tar.gz
cacert-devel-4193c98693d25611e2b99d975d70bd06e1417a95.tar.xz
cacert-devel-4193c98693d25611e2b99d975d70bd06e1417a95.zip
bug 1136: Fix things that got lost in a merge some time agobug-1136
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'includes')
-rw-r--r--includes/notary.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index 5fd64f1..8266b55 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -925,7 +925,7 @@
// called from includes/account.php if($process != "" && $oldid == 1)
// called from includes/account.php if($oldid == 50 && $process != "")
$email = mysql_real_escape_string($email);
- $query = "select * from `email` where `email`='$email' and `deleted`=0";
+ $query = "select 1 from `email` where `email`='$email' and `deleted`=0";
$res = mysql_query($query);
return mysql_num_rows($res) > 0;
}
@@ -935,9 +935,9 @@
// called from includes/account.php if($oldid == 50 && $process != "")
$uid = intval($uid);
if (0==$cca) {
- $query = "select * from `gpg` where `memid`='$uid' and `expire`>NOW()";
+ $query = "select 1 from `gpg` where `memid`='$uid' and `expire`>NOW()";
}else{
- $query = "select * from `gpg` where `memid`='$uid' and `expire`>NOW()+90*86400";
+ $query = "select 1 from `gpg` where `memid`='$uid' and `expire`>(NOW()-90*86400)";
}
$res = mysql_query($query);
return mysql_num_rows($res) > 0;
@@ -982,7 +982,7 @@
function check_is_orgadmin($uid){
// called from includes/account.php if($oldid == 50 && $process != "")
$uid = intval($uid);
- $query = "select * from `org` where `memid`='$uid' and `deleted`=0";
+ $query = "select 1 from `org` where `memid`='$uid' and `deleted`=0";
$res = mysql_query($query);
return mysql_num_rows($res) > 0;
}