Commit Graph

3241 Commits

Author SHA1 Message Date
Ferywir 90c5cdd97c fix(admin): escape reflected filter param in report/msg templates [#139] (#271) 2026-06-23 17:59:00 +03:00
Ferywir 749a55aaf5 fix(admin): escape reflected request params in admin templates [#139] (#270) 2026-06-23 17:37:11 +03:00
Ferywir e17bb3dec6 fix(admin): verify CSRF token in maintenance admin Mods [#139] (#269) 2026-06-23 17:01:20 +03:00
Ferywir 886f421f50 fix(admin): verify CSRF token in server-settings admin Mods [#139] (#268) 2026-06-23 16:12:54 +03:00
novgorodschi catalin c98bcf266b Set white font to view name
Set white font to view name
2026-06-23 14:45:38 +03:00
novgorodschi catalin 31b13873e8 Fix Server Settings in Admin Panel
Fix Server Settings in Admin Panel + fix New function in admin.php
2026-06-23 14:40:23 +03:00
novgorodschi catalin 8d492bebd3 Update some files & remove unused code
Update some files & remove unused code
2026-06-23 13:43:17 +03:00
Ferywir 6472b30bd2 fix(admin): verify CSRF token in message admin Mods [#139] (#264)
sendMessage, massmessage and sysmessage 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 (Newmessage.tpl, massmessage.tpl, sysmessage.tpl; the mass/sys templates
have both a prepare and an execute form).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 11:49:32 +03:00
novgorodschi catalin 5f86fdcbf6 Merge branch 'master' of https://github.com/Shadowss/TravianZ 2026-06-23 11:13:05 +03:00
novgorodschi catalin a9be6204db Added TravianZ Logo
Added TravianZ Logo
2026-06-23 11:12:58 +03:00
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
Ferywir e4658f250f fix(admin): route alliance management pages [#139] (#260)
The alliance/editAli/delAli pages are linked all over the admin panel
(?p=alliance&aid=, ?p=editAli, ?p=delAli) but were never in
admin_validated_page()'s whitelist, so admin.php fell back to search.tpl and
the pages never showed. Add them to the whitelist plus switch cases for the
breadcrumb (the templates resolve $aid/$alidata themselves from $_GET, like
editSitter/editPassword).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 11:06:03 +03:00
Ferywir ca991408c1 fix(admin): verify CSRF token in village admin Mods [#139] (#259)
editVillageOwner, renameVillage, editBuildings and editResources 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 (editVillage.tpl, village.tpl, editResources.tpl).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 10:31:08 +03:00
novgorodschi catalin 113e9029bd Fix ban view
Fix ban view
2026-06-23 10:30:16 +03:00
novgorodschi catalin b587e26591 Fix map view in Admin Panel
Fix map view in Admin Panel
2026-06-23 09:09:21 +03:00
Ferywir 8d1a1cab38 fix(admin): verify CSRF token in troop admin Mods [#139] (#258)
addTroops and addABTroops 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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 08:43:18 +03:00
Ferywir b880622fd1 fix(admin): route password/protection pages and align username validation (#257) 2026-06-23 06:55:13 +03:00
Ferywir e49069a9c6 fix(admin): verify CSRF token in player-management admin Mods [#139] (#256) 2026-06-23 06:54:03 +03:00
Ferywir 6888a09b5f fix(admin): let editPlus subtract Plus/bonus days as the form advertises (#254) 2026-06-22 18:41:28 +03:00
Ferywir 6e79c47951 fix(admin): verify CSRF token in Plus/Gold admin Mods [#139] (#253) 2026-06-22 18:40:43 +03:00
Ferywir 9d2d7699a9 fix(profile): neutralize stored XSS in profile descriptions [#250] (#252) 2026-06-22 16:31:20 +03:00
novgorodschi catalin 4b208dbfd8 Fix some things
Fix some things
2026-06-22 15:19:05 +03:00
Ferywir 228397d011 feature(rally-point): bold the "?" for incoming stacks below rally point level [#249] (#251)
On the rally point incoming tab, the number of an incoming unit type is never
revealed: it is always shown as a "?". When that stack is smaller than the
defender's rally point (gid 16) level, the "?" is rendered in solid black
bold, matching original Travian behaviour (e.g. rally point level 20 and an
incoming 19 praetorians shows a bold "?"). The eyesight artifact still reveals
which troop types are present (0 for the absent ones). Scope: village
attacks/raids only.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 13:40:59 +03:00
novgorodschi catalin 66c966cb5e New General Statistics
New General Statistics. Please help me with translate @Ferywir
2026-06-22 13:40:21 +03:00
novgorodschi catalin b9d36ba311 Fix also in admin panel removexss
Fix also in admin panel removexss
2026-06-22 12:40:07 +03:00
novgorodschi catalin c250a19f5a Fix #250
Fix #250
2026-06-22 12:34:31 +03:00
novgorodschi catalin 561933b23b Fix fLevel
Fix fLevel
2026-06-22 11:42:44 +03:00
novgorodschi catalin 41e0fd6313 Some fix
Some fix
2026-06-22 10:41:25 +03:00
novgorodschi catalin 337c94b981 Fix Admin Panel view & some PHP 8.1+
Fix Admin Panel view & some PHP 8.1+
2026-06-22 09:20:16 +03:00
Ferywir f581add125 feature(rally-point): mark incoming attacks + show per-troop travel time [#245] (#248) 2026-06-22 06:54:41 +03:00
Ferywir afbba3f841 fix(reports): pass aid on vilview report links so ally reports open [#246] (#247) 2026-06-21 21:04:56 +03:00
Catalin Novgorodschi e43dfdd410 Update README.md 2026-06-21 11:25:26 +03:00
Catalin Novgorodschi 3cf4530db6 Update README.md
Update readme
2026-06-20 21:00:31 +03:00
Ferywir b7e943ea90 fix(admin): wire CSRF token into admin.php-routed forms [#139] (#244) 2026-06-20 06:44:12 +03:00
Ferywir 1ce1003153 fix(chat): stop echoing the raw INSERT query in add_data() [#139] (#243) 2026-06-19 13:31:21 +03:00
Ferywir b0e6680705 fix(chat): replace eval() of server output with JSON.parse() [#139] (#242) 2026-06-19 13:30:54 +03:00
Ferywir 1a797bab80 fix(admin): prevent SQL injection in editAccess Mod [#139] (#241) 2026-06-19 13:30:25 +03:00
Ferywir 9c726a05b9 fix(admin): re-check admin rank in addUsers Mod (defense-in-depth) [#139] (#240) 2026-06-18 19:09:02 +03:00
Ferywir 1b978470c6 fix(session): refresh the 30s user-cache after a player's own changes (#239) 2026-06-18 14:59:44 +03:00
Ferywir cdc736839e i18n(alliance): render alliance news-feed notices in each reader's language (EN/FR/RO) (#238) 2026-06-18 10:22:15 +03:00
Ferywir d008261678 i18n: render system in-game messages in each reader's language (EN/FR/RO) (#237) 2026-06-17 18:19:24 +03:00
Ferywir 51c9cc5b2c i18n: render battle reports in each reader's language (EN/FR/RO) (#236) 2026-06-17 16:24:37 +03:00
Catalin Novgorodschi abe36748d7 Clea Automation.php
Clean unused code
2026-06-17 08:56:34 +03:00
Ferywir 0b1bd44d22 Perf: cache zero building levels in getFieldLevelInVillage [#155] (#235) 2026-06-16 18:22:10 +03:00
Ferywir b7feb7f2a1 Perf(sendunitsComplete): batch-preload getMInfo in preloadBattleData [#155] (#234) 2026-06-16 16:53:51 +03:00
Ferywir 3cdc6a6920 Refactor(sendunitsComplete): extract handleVillageDestruction() [#155] (#233) 2026-06-16 13:26:51 +03:00
Ferywir b3e49a6ecf Refactor(sendunitsComplete): extract finalizeReturnOrDeath() [#155] (#232) 2026-06-16 13:06:56 +03:00
Ferywir 0750755bc1 Refactor(sendunitsComplete): extract sendBattleNotifications() [#155] (#231) 2026-06-16 12:48:44 +03:00
Ferywir 070df6d479 Refactor(sendunitsComplete): extract handleHeroPostBattle() [#155] (#230) 2026-06-16 11:47:34 +03:00