Add sender verification to publish and swap object

Continuation of 8035df0

This is important to have on publish to identify cheaters who spam
create objects in the database or create objects with bad inventory.

- Renamed variables to backport to vanilla
- Removed % and & due to code filtering in publicvariableval.txt

Changes in modular_build.sqf were the same as player_build.sqf.

Tested with building, upgrading buildable/vehicle/tent, downgrading,
buying a vehicle, destroying tent and removing an object.
This commit is contained in:
ebayShopper
2017-11-03 16:09:14 -04:00
parent 6e48434001
commit 42e00475d6
41 changed files with 154 additions and 109 deletions

View File

@@ -225,17 +225,17 @@ _playerObj setVariable ["lastPos",getPosATL _playerObj];
_clientID = owner _playerObj;
_randomKey = [];
_randomInput = toArray "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*";
_randomInput = toArray "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$^*";
for "_i" from 0 to 12 do {
_randomKey set [count _randomKey, (_randomInput call BIS_fnc_selectRandom)];
};
_randomKey = toString _randomKey;
_findIndex = DZE_ServerPUIDArray find _playerID;
_findIndex = dayz_serverPUIDArray find _playerID;
if (_findIndex > -1) then {
DZE_ServerClientKeys set [_findIndex, [_clientID,_randomKey]];
dayz_serverClientKeys set [_findIndex, [_clientID,_randomKey]];
} else {
DZE_ServerPUIDArray set [(count DZE_ServerPUIDArray), _playerID];
DZE_ServerClientKeys set [(count DZE_ServerClientKeys), [_clientID,_randomKey]];
dayz_serverPUIDArray set [(count dayz_serverPUIDArray), _playerID];
dayz_serverClientKeys set [(count dayz_serverClientKeys), [_clientID,_randomKey]];
};
PVCDZ_plr_Login2 = [_worldspace,_state,_randomKey];