Skip to content

Public Variable Channel Index

rayswaynl edited this page Jun 4, 2026 · 58 revisions

Public Variable Channel Index

Claude-owned, source-cited (2026-06-02). The single canonical inventory of every publicVariable channel in the mission: the registered PVF commands (routed through the dispatcher) and the direct channels (their own addPublicVariableEventHandlers). This is the design surface for any BattlEye publicvariable.txt filter and for the server-authority redesign. Supersedes the two ad-hoc tables in Networking and the duplicate in SQF atlas (those should point here — see Wiki quality audit DUP-11). Paths relative to Missions/[55-2hc]warfarev2_073v48co.chernarus/. Arma 2 OA 1.64.

Trust legend

  • PVF (registered): travels as WFBE_PVF_<Name>; the dispatcher Spawns WFBE_SE_FNC_HandlePVF / WFBE_CL_FNC_HandlePVF, which Call Compile the sender-chosen command string — the DR-1 RCE/forgery surface. Payload fields are trusted (no server re-derivation) unless a specific handler validates them.
  • Direct: a bare publicVariable/publicVariableServer/publicVariableClient with its own event handler — not behind the dispatcher, so the DR-1 dispatcher fix does not cover it; each must be hardened individually. DR-41/DR-44 prove authority forgery on direct channels, and DR-46 proves direct-channel RCE through SEND_MESSAGE.
  • BattlEye: none of these are filtered except the kickAFK feature rule (DR-30); ATTACK_WAVE_INIT and all others are unfiltered.

1. Registered PVF commands

Registration: Common/Init/Init_PublicVariables.sqf — server-bound list :9-21, client-bound list :25-40, dispatch wiring :44-51. Each name X -> channel WFBE_PVF_X -> pre-compiled SRVFNC X / CLTFNC X (built :45,:50) but dispatched via Call Compile (Server_HandlePVF.sqf:14 / Client_HandlePVF.sqf:22).

1a. Server-bound (client → server) — 13

For implementation work after PVF dispatch allowlisting, use the registered server PVF handler authority matrix. This index owns channel inventory; the authority map owns per-handler validation shape.

Command (WFBE_PVF_*) Purpose / notable finding
RequestVehicleLock lock/unlock a payload-selected vehicle; owner/side/range validation is not visible in the handler
RequestOnUnitKilled report a kill for scoring
RequestChangeScore score mutation; accepts payload score and applies addScore, unlike safer server-derived award helpers
RequestCommanderVote commander vote
RequestNewCommander assign new commander — DR-15 (_side = _this call-shape bug); flow map in Commander/HQ lifecycle
RequestStructure build a structure — DR-6 (no commander/funds/placement check)
RequestDefense build a defense — DR-6
RequestJoin join handshake (robust 30s-retry, DR-37)
RequestMHQRepair MHQ repair — DR-6-class (_side from payload); lifecycle/risk map in Commander/HQ lifecycle
RequestSpecial multiplexer → Server_HandleSpecial.sqf (ICBM/paradrop/uav/HC/…) — DR-27 (forged ["ICBM",…] = map-wide kill)
RequestTeamUpdate team/group property update; mutates behavior/combat/formation/speed from payload-selected team/side
RequestUpgrade side upgrade purchase — DR-23 (client-authoritative)
RequestAutoWallConstructinChange auto-wall construction toggle; writes one global setting consumed by later SmallSite/MediumSite construction

Scout refinement 2026-06-04: the thinner registered handlers above are still live hardening surfaces after a future PVF dispatcher fix. In particular, RequestChangeScore, RequestVehicleLock, RequestTeamUpdate, RequestAutoWallConstructinChange, RequestStructure, RequestDefense and RequestUpgrade need requester/side/object/funds validation at the handler/effect layer, not only dispatcher allowlisting.

1b. Client-bound (server → client) — 15

For runtime/JIP behavior after these messages arrive, use the registered client PVF runtime matrix. This page owns channel inventory; Networking owns client-side effect and replay notes.

Command (WFBE_PVF_*) Purpose / notable finding
AllCampsCaptured all-camps event
AwardBounty / AwardBountyPlayer bounty award to side / player
CampCaptured camp capture event
ChangeScore push score change to clients
HandleSpecial multiplexer → Client_FNC_Special.sqf (endgame/group/icbm-display/hq-status/delegate-*/…)
LocalizeMessage localized message multiplexer
SetTask task assignment
SetVehicleLock / SetMHQLock lock-state push; HQ/MHQ context in Commander/HQ lifecycle
TownCaptured town capture event
Available availability push
RequestBaseArea base-area (client-bound despite the name); moves an object, stamps avail/side and appends to wfbe_basearea with no local validation in the client callback; multiplayer-sensitive HQ deploy edge in Commander/HQ lifecycle
HandleParatrooperMarkerCreation paratrooper-drop unit marker creation; source and maintained Vanilla are propagated, Arma smoke pending in Paratrooper marker revival
NukeIncoming nuke-incoming broadcast (paired with the ICBM direct channels)

DatabaseDebug is registered-commented (:30).

2. Direct publicVariable channels (own event handlers)

Each has its own addPublicVariableEventHandler; not behind the dispatcher.

Channel Direction Purpose / notable finding Source
ATTACK_WAVE_INIT client → server activate heavy attack-wave; DR-41 — server trusts client _supply/_side, no re-derivation → free units side-wide Common/Functions/Common_AttackWaveActivate.sqf:6-8, Server/Functions/Server_AttackWave.sqf
ATTACK_WAVE_DETAILS direct server event channel DR-41 detail payload; intended sender is Server_AttackWave.sqf, but the direct handler also trusts payload _side, _priceModifier and _attackLength, stores active-side state, drains side supply and replays active modifiers to JIP clients. Treat this as a forgeable direct-PV authority surface unless BattlEye/handler validation prevents clients from publishing it. Server/Functions/Server_AttackWave.sqf:23-27,36-38, Server/PVFunctions/AttackWave.sqf:19-25,32-46,58-62
WFBE_CL_MASH_MARKER_CREATED (intended) client → server DR-34 — never broadcast in current Chernarus (dead/orphaned); modded forks have sender-only drift Server/Module/MASH/MASHMarker.sqf:1 (orphaned PVEH)
WFBE_SE_MASH_MARKER_SENT (intended) server → clients DR-34 — receiver commented Init_Client.sqf:132 (dead) Client/Module/MASH/receiverMASHmarker.sqf:1
WFBE_Client_PV_IsSupplyMissionActiveInTown client → server supply-cooldown query (pull-based; JIP-correct, DR-39) Server/Module/supplyMission/isSupplyMissionActiveInTown.sqf:1
WFBE_Server_PV_IsSupplyMissionActiveInTown server → clients cooldown answer (broadcast not targeted) Client/Module/supplyMission/townSupplyStatus.sqf:1
WFBE_Client_PV_SupplyMissionStarted client → server start supply mission; live handler is supplyMissionStarted.sqf, while compiled supplyMissionActive.sqf is a dead twin Client/Module/supplyMission/supplyMissionStart.sqf:39, Server/Module/supplyMission/supplyMissionStarted.sqf:1, Server/Init/Init_Server.sqf:81
WFBE_Server_PV_SupplyMissionCompleted server module -> server handler supply completion event; still consumes vehicle object vars that are stamped during client start Server/Module/supplyMission/supplyMissionStarted.sqf:64-65, Server/Module/supplyMission/supplyMissionCompleted.sqf:2,9-12
WFBE_Server_PV_SupplyMissionCompletedMessage server -> clients supply completion message and client-side player cash award; exact channel matters for BattlEye filters and should not be hidden behind ...CompletedMessage shorthand Server/Module/supplyMission/supplyMissionCompleted.sqf:24,34, Client/Module/supplyMission/supplyMissionCompletedMessage.sqf:2
wfbe_supply_temp_east / wfbe_supply_temp_west client → server side-supply mutation — DR-44 direct-PV forgery class plus DR-22 broken-floor risk. Server handlers trust payload _side and _amount; the channel suffix does not constrain which side is mutated, so validation must check both side/channel consistency and amount bounds. Common/Functions/Common_ChangeSideSupply.sqf:28-30, Server/Functions/Server_ChangeSideSupply.sqf:1-21,25-45
wfbe_supply_WEST / wfbe_supply_EAST server -> clients / JIP state mirror side-supply balance mirror after a server-side change. This is not the temp mutation channel above; clients wait for wfbe_supply_<sideJoinedText> on join and GetSideSupply reads the same namespace key. Server/Functions/Server_ChangeSideSupply.sqf:19-21,43-45, Client/Init/Init_Client.sqf:369-371, Common/Functions/Common_GetSideSupply.sqf:11-18
ICBM_launched server → clients ICBM launch FX trigger Client/FSM/updateclient.sqf:20
PLAYER_RADIATED client -> clients nuke radiation effect. radzone.sqf publishes the event from the client-side radiation check, and clients install the receiver in updateclient.sqf; do not treat this as server-authoritative damage logic. Client/Module/Nuke/radzone.sqf:103-104, Client/FSM/updateclient.sqf:24, Client/Module/Nuke/OnEventHandler_player_radiated.sqf
AFKthresholdExceededName / kickAFK client → server/BattlEye Dual AFK paths. The older module publishes AFKthresholdExceededName and calls failMission "END1" after its local threshold; the server handler only logs the reported name. The newer FSM path publishes kickAFK, covered by the repo BattlEye filter rule. Client/Init/Init_Client.sqf:256-264, Client/Module/AFKkick/monitorAFK.sqf:24-30, Server/Module/afkKick/initAFKkickHandler.sqf:9-12, Client/FSM/updateclient.sqf:153-160, BattlEyeFilter/publicvariable.txt:1-2
WFBE_DAYNIGHT_DATE server → clients day/night drift sync (reviewed clean, Round 17) Server/Functions/Server_DayNightCycle.sqf
SERVER_FPS_GUI / WFBE_VAR_SERVER_FPS server → clients server FPS GUI/HUD publication. Current source Chernarus player UI reads SERVER_FPS_GUI; WFBE_VAR_SERVER_FPS is a second dedicated publisher with no source Chernarus player-UI reader found, so future ops cleanup should either preserve it as a compatibility channel or retire it deliberately. Server/GUI/serverFpsGUI.sqf:6-7, Server/Module/serverFPS/monitorServerFPS.sqf:5-6, Client/Client_UpdateRHUD.sqf:113, Server/Init/Init_Server.sqf:578,595
IS_WEST_HQ_ALIVE / IS_EAST_HQ_ALIVE server → clients HQ alive-state broadcast; see Commander/HQ lifecycle Server/Functions/Server_MHQRepair.sqf, Server/Functions/Server_OnHQKilled.sqf
HQ_WEST_MARKER_INFOS / HQ_EAST_MARKER_INFOS server → clients HQ marker payload broadcast; see Commander/HQ lifecycle Server/Functions/Server_MHQRepair.sqf, Server/Functions/Server_OnHQKilled.sqf
SUPPLY_COMPENSATION_AMOUNT_EAST / SUPPLY_COMPENSATION_AMOUNT_WEST server → clients AntiStack skill-difference supply compensation Server/Module/AntiStack/skillDiffCompensation.sqf
TEAM_WEST_TICKS_NO_PLAYERS / TEAM_EAST_TICKS_NO_PLAYERS common/server → clients no-player supply-income stagnation counters Common/Functions/Common_StagnateSupplyIncomeNoPlayers.sqf
MARKER_CREATION server → clients map-marker creation channel WASP/marker code
SEND_MESSAGE mixed DR-46 direct-channel RCE surface. The client receiver call-compiles network message text when payload flag index 3 says it is a multi-language message, and Common_SendMessage.sqf also compiles the same message text locally before broadcasting when that helper runs on a receiving side. The side filter and compile flag are payload-controlled. This bypasses PVF dispatcher hardening entirely. Fix by sending structured localization keys/args and resolving locally without compiling message text. Client/FSM/updateclient.sqf:10-12, Client/Functions/Client_onEventHandler_SEND_MESSAGE.sqf:23-33, Common/Functions/Common_SendMessage.sqf:22-38; Deep review DR-46
REQUEST_SUPPLY_VALUE / SUPPLY_VALUE_REQUESTED client ↔ server supply-value request/response; read/probe surface rather than final mutation, and a useful safer pattern because the server derives the response value Common/Functions/Common_GetSideSupply.sqf:15, Server/Functions/Server_PV_RequestSupplyValue.sqf:1,8, Client/Functions/Client_ReceiveSupplyValue.sqf:1,7
WFBE_CLIENT_HAS_CONNECTED_AT_LAUNCH / WFBE_P_HAS_CONNECTED_AT_LAUNCH_ACK client ↔ server launch-connect handshake (DR-37). The server stores side from a client-published player object and publishes boolean true back to the owner, but the client receiver stores the whole PVEH tuple in WFBE_P_HAS_CONNECTED_AT_LAUNCH_ACK; treat it as tuple-shaped truthiness until normalized. Client/Init/Init_Client.sqf:442-456, Server/Module/AntiStack/clientHasConnectedAtLaunch.sqf:1-16, Client/Module/AntiStack/hasConnectedAtLaunchACK.sqf:1-7
CLIENT_INIT_READY client → server client-init-ready signal. Attack-wave code uses this as an explicit replay hook for current active wave details, separate from generic replicated waits and join ACK retry behavior. Client/Init/Init_Client.sqf:960-962, Server/PVFunctions/AttackWave.sqf:1-15
WFBE_C_PLAYER_OBJECT client → server player-object publication for WFBE_SE_PLAYERLIST; source indexing is patched, but sender/UID validation and disconnect pruning/stale row cleanup remain open. The handler accepts [playerObject, uid] and supply mission player lookup later depends on this list. Client/Init/Init_Client.sqf:759-760, Server/Module/supplyMission/playerObjectsList.sqf:1-40, Server/Module/supplyMission/supplyMissionStarted.sqf:31-65
CBA_display_ingame_warnings global bootstrap broadcast disables CBA in-game warnings during mission bootstrap. Low gameplay risk, but it is still a public variable and belongs in the BattlEye/publicVariable inventory. initJIPCompatible.sqf:24-25

Hardening note

For a real BattlEye publicvariable.txt, the default-deny whitelist must cover both tables — registered WFBE_PVF_* names and these direct channels — keeping kickAFK. But BattlEye is defense-in-depth only; the durable fix is server-side authority in the PVF handlers (DR-1), direct handler validation for authority channels (DR-41/DR-44) and removal of direct network-data compilation (SEND_MESSAGE, DR-46). See Pending owner decisions.

Continue Reading

Conventions: Variable and naming conventions | Dispatch internals: Networking | Findings: Deep-review findings

Sidebar

Clone this wiki locally