diff --git a/includes/account.php b/includes/account.php index 584439f..a0718d2 100644 --- a/includes/account.php +++ b/includes/account.php @@ -709,7 +709,7 @@ } } - if($oldid == 12 && $renew != "") + if($oldid == 12 && array_key_exists('renew',$_REQUEST) && $_REQUEST['renew'] != "") { $id = 12; showheader(_("My CAcert.org Account!")); @@ -809,7 +809,7 @@ exit; } - if($oldid == 12 && $revoke != "") + if($oldid == 12 && array_key_exists('revoke',$_REQUEST) && $_REQUEST['revoke'] != "") { $id = 12; showheader(_("My CAcert.org Account!")); @@ -830,7 +830,7 @@ continue; } $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue; @@ -876,7 +876,7 @@ exit; } - if($oldid == 5 && $renew != "") + if($oldid == 5 && array_key_exists('renew',$_REQUEST) && $_REQUEST['renew'] != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -939,7 +939,7 @@ exit; } - if($oldid == 5 && $revoke != "") + if($oldid == 5 && array_key_exists('revoke',$_REQUEST) && $_REQUEST['revoke'] != "") { $id = 5; showheader(_("My CAcert.org Account!")); @@ -958,7 +958,7 @@ continue; } $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue; @@ -1002,7 +1002,7 @@ exit; } - if($oldid == 5 && $change != "") + if($oldid == 5 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "") { showheader(_("My CAcert.org Account!")); //echo _("Now changing the settings for the following certificates:")."
\n"; @@ -1012,8 +1012,9 @@ if(substr($id,0,5)=="cert_") { $id = intval(substr($id,5)); + $dis=(array_key_exists('disablelogin_'.$id,$_REQUEST) && $_REQUEST['disablelogin_'.$id]=="1")?"0":"1"; //echo "$id -> ".$_REQUEST['disablelogin_'.$id]."
\n"; - mysql_query("update `emailcerts` set `disablelogin`='".($_REQUEST['disablelogin_'.$id]=="1"?"0":"1")."' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'"); + mysql_query("update `emailcerts` set `disablelogin`='$dis' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'"); //$row = mysql_fetch_assoc($res); } } @@ -1420,7 +1421,7 @@ } } - if($oldid == 18 && $renew != "") + if($oldid == 18 && array_key_exists('renew',$_REQUEST) && $_REQUEST['renew'] != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1442,7 +1443,7 @@ } mysql_query("update `orgemailcerts` set `renewed`='1' where `id`='$id'"); $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue; @@ -1482,7 +1483,7 @@ exit; } - if($oldid == 18 && $revoke != "") + if($oldid == 18 && array_key_exists('revoke',$_REQUEST) && $_REQUEST['revoke'] != "") { $id = 18; showheader(_("My CAcert.org Account!")); @@ -1502,7 +1503,7 @@ continue; } $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue; @@ -1701,7 +1702,7 @@ } } - if($oldid == 22 && $renew != "") + if($oldid == 22 && array_key_exists('renew',$_REQUEST) && $_REQUEST['renew'] != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1723,7 +1724,7 @@ } mysql_query("update `orgdomaincerts` set `renewed`='1' where `id`='$id'"); $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue; @@ -1767,7 +1768,7 @@ exit; } - if($oldid == 22 && $revoke != "") + if($oldid == 22 && array_key_exists('revoke',$_REQUEST) && $_REQUEST['revoke'] != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1788,7 +1789,7 @@ continue; } $row = mysql_fetch_assoc($res); - if($row[revoke] > 0) + if($row['revoke'] > 0) { printf(_("It would seem '%s' has already been revoked. I'll skip this for now.")."
\n", $row['CN']); continue;