11 Commits

Author SHA1 Message Date
Ferywir fb225b562f fix(admin): repair broken admin-log variables in medals Mod (#262)
The post-delete admin-log block referenced variables that were never defined
($admid/$adminID/$medalid/$uid), so on PHP 8.1+ (mysqli throws on error) the
malformed INSERT raised an uncaught mysqli_sql_exception → HTTP 500 after the
medal was already deleted. Use the correct ids ($admid from session, $uid from
POST), look up the target player's username (escaped), and redirect to the
sanitized $uid.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 11:12:04 +03:00
Ferywir 8a3a67d175 fix(admin): verify CSRF token in alliance/medal admin Mods [#139] (#261)
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>
2026-06-23 11:11:32 +03:00
Catalin Novgorodschi 59c1114b1c Change some text on license TravianZ 2025-02-11 11:22:22 +02:00
iopietro e3632b9aa1 General fixes
+Medals can now be deleted correctly
2018-06-11 01:21:12 +02:00
Martin Ambrus 0984c7ef34 fix: DB connection is global and tries 2 tested ways to connect
Some installations seem to support localhost:port for 1st parameter of
mysqli_connect(), others will only support the official parameters with
port towards the end. This fix tries them both - first the official one,
then the localhost:port one.

Also, there were a lot of mysqli_connect()'s inside Admin mods. These
now also use the central Database class.
2017-11-20 01:09:49 +01:00
Martin Ambrus 4e91b02f07 fix: removing single medal from player
Relates to #283
2017-11-06 21:05:28 +01:00
Martin Ambrus 331885a110 fix: remove SQL injections in Admin 2017-10-19 21:17:11 +02:00
Martin Ambrus 92b9a7b043 fix: a lot of MySQL calls in templates replaced by MySQLi ones 2017-08-28 23:56:59 +02:00
uroskn 1afde368d3 GameEngine and install folders have 777 already set by default 2016-07-02 21:39:28 +02:00
Shadow 80c8d93edf security update 2014-02-13 08:05:11 +02:00
yi12345 98e94af807 finish hero_full.php 2013-06-16 10:38:34 +03:00