mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-31 23:57:13 +00:00
editAli, delAli, medals, delallymedal, delallymedalbyaid, delallymedalbyweek and deletemedalbyweek are POSTed to directly, bypassing admin.php's central csrf_verify(). Add csrf_verify() (after the admin access check, via the shared GameEngine/Admin/csrf.php) and csrf_field() in their forms (playermedals.tpl, editAli.tpl, delAli.tpl, delmedal.tpl, allymedals.tpl, delallymedal.tpl). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
<td><img class="medal" src="../gpack/travian_default/img/t/'.$medal['img'].'.jpg"></td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
|
||||
'.csrf_field().'
|
||||
<input type="hidden" name="uid" value="'.$_GET['uid'].'">
|
||||
<input type="hidden" name="medalid" value="'.$medal['id'].'">
|
||||
<button type="submit" class="medals-del" title="Delete medal">
|
||||
@@ -71,6 +72,7 @@
|
||||
echo '<tr class="avg-row"><td style="text-align:left"><b>Average Rank</b></td><td>'.$average.'</td><td></td><td></td><td>Delete All</td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
|
||||
'.csrf_field().'
|
||||
<input type="hidden" name="uid" value="'.$_GET['uid'].'">
|
||||
<input type="hidden" name="userid" value="'.$id.'">
|
||||
<button type="submit" class="medals-del" title="Delete all medals">
|
||||
|
||||
Reference in New Issue
Block a user