Fixed a lot of bugs/security issues in the alliance

+You can no longer kick people of other alliances
+You can no longer change the forum link with no permissions
+You can no longer make more than 3 total confederation and 3 total NAP
+You can no longer send a diplomacy pact to an alliance with already one
pact or one pending pact
+You can no longer handle diplomacy without permissions
+Fixed security bugs related to invites (sending, deleting etc.)
+You can no longer access to any alliance submenus without permissions
(kick menu, diplomacy menu, etc.)
+Errors are now shown correctly and better handling of them
+New forum link and alliance description are shown correctly after
editing them
+You can no longer access to other alliances informations without being
in it (attack reports, news, etc)
+Corrected some alliance news
+Added some language constants to en.php
+Fixed and changed some database.php functions alliance related
This commit is contained in:
Pietro Fallanca
2018-04-15 16:11:43 +02:00
parent 86070d1691
commit 274d89bfa1
22 changed files with 313 additions and 389 deletions
+9 -13
View File
@@ -1,10 +1,6 @@
<?php
if(isset($aid)) {
$aid = $aid;
}
else {
$aid = $session->alliance;
}
if(!isset($aid)) $aid = $session->alliance;
$allianceinfo = $database->getAlliance($aid);
echo "<h1>".$allianceinfo['tag']." - ".$allianceinfo['name']."</h1>";
include("alli_menu.tpl");
@@ -66,30 +62,30 @@ if($ntype==4 || $ntype==5 || $ntype==6 || $ntype==7){
$outputList .= "<div><a href=\"berichte.php?id=".$id."&aid=".$ally."\">";
if($ntype==0){ $nn = " scouts "; }else{ $nn = " attacks "; }
$outputList .= $database->getUserField($dataarray[0],username,0);
$outputList .= $database->getUserField($dataarray[0], "username", 0);
$outputList .= $nn;
$outputList .= $database->getUserField($dataarray[28],username,0);
$outputList .= $database->getUserField($dataarray[28], "username", 0);
if($ntype==0){
$isoasis = $database->isVillageOases($toWref);
if($isoasis == 0){
if($toWref != $village->wid){
$getUser = $database->getVillageField($toWref,owner);
}else{
$getUser = $database->getVillageField($dataarray[1],owner);
$getUser = $database->getVillageField($dataarray[1], "owner");
}
}else{
if($toWref != $village->wid){
$getUser = $database->getOasisField($toWref,owner);
}else{
$getUser = $database->getOasisField($dataarray[1],owner);
$getUser = $database->getOasisField($dataarray[1], "owner");
}
}
$getUserAlly = $database->getUserField($getUser,alliance,0);
$getUserAlly = $database->getUserField($getUser, "alliance", 0);
}else if($ntype==1 or $ntype==2 or $ntype==3 or $ntype==18 or $ntype==19){
$getUserAlly = $database->getUserField($dataarray[28],alliance,0);
$getUserAlly = $database->getUserField($dataarray[28], "alliance", 0);
}else{
$getUserAlly = $database->getUserField($dataarray[0],alliance,0);
$getUserAlly = $database->getUserField($dataarray[0], "alliance", 0);
}
$getAllyName = $database->getAllianceName($getUserAlly);