Headline
CVE-2012-10008: All users are now unified in the users table. Club and site administr… · uakfdotb/oneapp@5413ac8
A vulnerability, which was classified as critical, has been found in uakfdotb oneapp. This issue affects some unknown processing. The manipulation leads to sql injection. The attack may be initiated remotely. This product does not use versioning. This is why information about affected and unaffected releases are unavailable. The name of the patch is 5413ac804f1b09f9decc46a6c37b08352c49669c. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-221483.
@@ -4,65 +4,43 @@ include(“…/include/db_connect.php”); include(“…/include/session.php”);
if(isset($_SESSION[‘admin_id’])) { $club_id = escape(getAdminClub($_SESSION[‘admin_id’])); $admin_id = escape($_SESSION[‘admin_id’]); if(isset($_SESSION[‘admin’])) { $club_id = $_SESSION[‘admin_club_id’]; $user_id = $_SESSION[‘user_id’];
if($club_id != 0) { if(isset($_REQUEST[‘action’])){ $currpass = mysql_query(“SELECT password FROM admins WHERE id=’” . $_SESSION[‘admin_id’] . “’”); $currpass = mysql_fetch_array($currpass); if($_REQUEST[‘old_password’]==$currpass[0]){ if(isset($_REQUEST[‘description’]) && isset($_REQUEST[‘view_time’]) && isset($_REQUEST[‘open_time’]) && isset($_REQUEST[‘close_time’]) && isset($_REQUEST[‘user_type’])) { $description = escape($_REQUEST[‘description’]); $view_time = strtotime($_REQUEST[‘view_time’]); $open_time = strtotime($_REQUEST[‘open_time’]); $close_time = strtotime($_REQUEST[‘close_time’]); $num_recommend = escape($_REQUEST[‘num_recommend’]); $user_type = escape($_REQUEST[‘user_type’]); if($user_type == “Name”){ $usernot = 1; } else { $usernot = 0; }
mysql_query(“UPDATE clubs SET description=’$description’, view_time=’$view_time’, open_time=’$open_time’, close_time=’$close_time’, num_recommend=’$num_recommend’ WHERE id=’$club_id’”); $success = "Account Updated!"; } if(isset($_REQUEST[‘new_password’])) { $changepass = changeAdminPass($admin_id,$_REQUEST[‘new_password’],$_REQUEST[‘new_password_conf’]); if($changepass == 1){ $success = "Password Updated!"; } else if($changepass == -2){ $error = "New password does not match!"; } else { $error = "Invaid new password!"; } } } else { $error = "Incorrect password! If you have forgotten this password, contact your rood advisor."; } } else { $info = "You need your current password to make any changes!"; if(isset($_REQUEST[‘description’]) && isset($_REQUEST[‘view_time’]) && isset($_REQUEST[‘open_time’]) && isset($_REQUEST[‘close_time’])) { $description = escape($_REQUEST[‘description’]); $view_time = strtotime($_REQUEST[‘view_time’]); $open_time = strtotime($_REQUEST[‘open_time’]); $close_time = strtotime($_REQUEST[‘close_time’]); $num_recommend = escape($_REQUEST[‘num_recommend’]);
mysql_query(“UPDATE clubs SET description=’$description’, view_time=’$view_time’, open_time=’$open_time’, close_time=’$close_time’, num_recommend=’$num_recommend’ WHERE id=’$club_id’”); $success = "Club updated successfully."; }
$result = mysql_query(“SELECT c.name, a.email, c.description, c.view_time, c.open_time, c.close_time, c.num_recommend FROM clubs c, admins a WHERE c.id=’$club_id’ AND a.id=’$admin_id’”); $result = mysql_query(“SELECT name, description, view_time, open_time, close_time, num_recommend FROM clubs WHERE id=’$club_id’”);
if($row = mysql_fetch_array($result)) { if( isset($error) ) { get_page_advanced("man_club", "admin", array('error’=> $error, ‘email’ => $row[‘email’], ‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’])); $parameters = array(‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’]);
if(isset($error)) { $parameters[‘error’] = $error; } else if( isset($success) ){ get_page_advanced("man_club", "admin", array(‘success’ => $success, ‘email’ => $row[‘email’], ‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’])); $parameters[‘success’] = $success; } else if( isset($info) ){ get_page_advanced("man_club", "admin", array(‘info’ => $info, ‘email’ => $row[‘email’], ‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’])); $parameters[‘info’] = $info; } else if( isset($warning) ){ get_page_advanced("man_club", "admin", array(‘warning’ => $warning, ‘email’ => $row[‘email’], ‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’])); } else { get_page_advanced("man_club", "admin", array(‘email’ => $row[‘email’], ‘club_name’ => $row[‘name’], ‘description’ => $row[‘description’], ‘view_time’ => $row[‘view_time’], ‘open_time’ => $row[‘open_time’], ‘close_time’ => $row[‘close_time’], ‘num_recommend’ => $row[‘num_recommend’])); $parameters[‘warning’] = $warning; }
get_page_advanced("man_club", "admin", $parameters); } else { get_page_advanced("message", "admin", array(‘message’ => "Error: your club cannot be found in the clubs table.", ‘title’ => “Manage Club”)); } } else { get_page_advanced("message", "admin", array(‘message’ => "Error: general application does not have club settings.", ‘title’ => “Manage Club”)); } } else { header(‘Location: index.php?error=’ . urlencode(“You are not logged in!”));