Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Fortify: Simultaneous deploy. Cheating possible #185

Open
severgun opened this issue Jun 23, 2019 · 2 comments
Open

Fortify: Simultaneous deploy. Cheating possible #185

severgun opened this issue Jun 23, 2019 · 2 comments
Labels
Milestone

Comments

@severgun
Copy link
Contributor

severgun commented Jun 23, 2019

Arma 3 Version: 1.94 (stable)
CBA Version: 3.11.1 (stable)
ACE3 Version: 3.12.6 (stable)
ACEX Version: 3.4.2 (stable)

Mods:

- CBA_A3
- ace
- acex

Description:

  • It is hard to reproduce but... Simultaneous deploy can lead to -1 in budget and unlock infinite building capability.
    private _budget = [_side] call FUNC(getBudget);
    private _newBudget = _budget + _change;

    Would be nice to have result of sum limited by 0.

Steps to reproduce:

  • Set cost and budget
    [west, 7, [["Land_TentA_F", 5],["Land_SandbagBarricade_01_half_F", 3]]] call acex_fortify_fnc_registerObjects;
  • Try to build 2 objects simultaneously.

Where did the issue occur?

  • Dedicated / Self-Hosted Multiplayer / Editor (Multiplayer)
@jonpas jonpas added this to the 3.4.3 milestone Jun 23, 2019
@jonpas jonpas added the bug label Jun 23, 2019
@jonpas jonpas modified the milestones: 3.4.3, 3.5.0 Jun 24, 2019
@PabstMirror
Copy link
Contributor

I remember that the spending wasn't "thread safe", but I think we figured that a random double spend wouldn't be a big deal
but obviously getting it to -1 is 😄

the real fix would be doing all spending on the server, with proper event passing to ensure that the var is only updated from a single source

@severgun
Copy link
Contributor Author

What if you have 10 players with fortify tool? Will it discard building or hold payments?
Actually we have modified version of acex with progress bar and because of my mistake we got easy reproducible breach and players were happy to use it

@PabstMirror PabstMirror modified the milestones: 3.5.0, Ongoing Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants