Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Vouchers can be reused under concurrent access #4812
When two customers check out concurrently using the same voucher, the voucher can be used twice.
Steps to reproduce
We have reproduced this behavior on a single machine, by performing the above steps with one customer in one browser window and another customer in a second browser window with a short communication delay (200 ms) between the database and application. If connecting to the database using unix sockets, the following script can act as a proxy that delays packets:
Only one order completes using the voucher, the other order ends in the fraud status.
Both orders successfully complete using the voucher.