Skip to content

Commit

Permalink
Add missing auth check for function 'SetupEditServer'
Browse files Browse the repository at this point in the history
Thanks to vellichor for finding this issue
  • Loading branch information
Groruk committed Oct 6, 2021
1 parent b227894 commit 5f14636
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/includes/sb-callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -1887,6 +1887,14 @@ function SetupEditServer($sid)
{
$objResponse = new xajaxResponse();
$sid = (int)$sid;

if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_SERVER_SETTINGS|ADMIN_SERVER_ADD))
{
$objResponse->redirect("index.php?p=login&m=no_access", 0);
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to edit a server, but doesn't have access.");
return $objResponse;
}

$server = $GLOBALS['db']->GetRow("SELECT * FROM ".DB_PREFIX."_servers WHERE sid = $sid");

// clear any old stuff
Expand Down

0 comments on commit 5f14636

Please sign in to comment.