qbcore-framework / qb-inventory

Slot Based Inventory System Used With QB-Core :school_satchel:
GNU General Public License v3.0
49 stars 376 forks source link

[BUG] Major inventory duplication bug. #435

Closed TheRealWinnex closed 10 months ago

TheRealWinnex commented 1 year ago

Summary

It is possible to duplicate any item on any server utilising the standard qb-inventory.

Reproduction

  1. Have any item with an item number of 1. Didn't test if other counts work.
  2. Have any item number with X > 1 amount of items, e.g. 200 pistol ammo or 2.
  3. Have 2 players.
  4. Player A robs Player B.
  5. Player A gives Player B the item they wish to duplicate e.g. 200 pistol ammo.
  6. Player A takes everything but 1, e.g. 199 pistol ammo.
  7. Player B takes the item they have 1 of, and moves it into the spot of the 200 pistol ammo.
  8. Player B opens their inventory again.
  9. Player B has 200 pistol ammo, Player A has 199 pistol ammo -> everything but 1 is duplicated.

Expected behavior

No duplication...

Actual behavior

Duplication...

Additional context

N/A

Last Updated

Today

Custom Resources

N/A

Resource Rename

No.

LordChunk commented 1 year ago

Sounds like this could be similar to #403

github-actions[bot] commented 11 months ago

This issue has had 60 days of inactivity & will close within 7 days