Skip to content

Commit 5f14636

Browse files
committed
Add missing auth check for function 'SetupEditServer'
Thanks to vellichor for finding this issue
1 parent b227894 commit 5f14636

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

web/includes/sb-callback.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,14 @@ function SetupEditServer($sid)
18871887
{
18881888
$objResponse = new xajaxResponse();
18891889
$sid = (int)$sid;
1890+
1891+
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_SERVER_SETTINGS|ADMIN_SERVER_ADD))
1892+
{
1893+
$objResponse->redirect("index.php?p=login&m=no_access", 0);
1894+
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to edit a server, but doesn't have access.");
1895+
return $objResponse;
1896+
}
1897+
18901898
$server = $GLOBALS['db']->GetRow("SELECT * FROM ".DB_PREFIX."_servers WHERE sid = $sid");
18911899

18921900
// clear any old stuff

0 commit comments

Comments
 (0)