v3.0.29 security
Server-checked keys and locks, a lockpick that can't be skipped, and a far lighter client
13changes

Server-checked keys and locks, a lockpick that can't be skipped, and a far lighter client
13changes

[02] Release
Key grants and lock changes are now authorized by the server, the lockpick enforces a real duration, requests are rate-limited, and the client costs almost nothing on foot. Scripts that give keys from the client should switch to GiveServerKeys.
Replace the resource.
If you kept your old config/main.lua, add Config.ImpoundJobs = {} (a missing value is treated as empty).
Important for developers: rental, job garage and dealership scripts must give keys from the server with exports['qs-vehiclekeys']:GiveServerKeys(source, plate, model). The client export GiveKeys is now validated and can be refused when the player does not own the car; the client then receives vehiclekeys:client:keysDenied.
Key requests from a player's game (hotwire, NPC robbery, client GiveKeys, qb-vehiclekeys:server:AcquireVehicleKeys, Qbox giveKeys) are now checked on the server and refused unless the player owns the car, already holds its key or has an authorized job.
Lock changes need server approval: owner, key holder or an authorized job (police or Config.ImpoundJobs). The lock state must be a valid GTA lock value.
The minimum duration could be skipped. The server now records when the lockpick starts and enforces a minimum time (Config.Lockpick.MinDurationMs, 1200 ms by default) before granting the unlock or key.
Each player is limited in how many requests they can send per second, inputs are sanitized, and every SQL query uses parameters and safe table names.
Extra jobs (impound, tow...) allowed to lock, unlock and handle keys for other players' cars.
On start, the server console checks dependencies, framework and inventory and warns when something is wrong. oxmysql is now declared as a dependency.
One block per new version with its 3 most important changes, repeated only when something changed.
Client GiveKeys is now validated and can be refused when the player does not own the car (the client receives vehiclekeys:client:keysDenied). Rentals, job garages and dealerships should use exports['qs-vehiclekeys']:GiveServerKeys(source, plate, model).
The tracker now waits for ox_target to start instead of checking once on load.
Engine and key checks only run while in a vehicle (about 0.00-0.01 ms idle). NPC traffic locking sleeps longer when standing still, copy shop and recovery prompts no longer allocate every frame, and diagnostic and tracker checks only run when needed.
An indexed plate lookup with a short 15-second cache replaces repeated database scans.