mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-21 21:53:30 +00:00
Protect query on Eboutic to prevend double basket validation
This commit is contained in:
parent
cfbd610305
commit
02be5e1629
@ -180,7 +180,7 @@ class EtransactionAutoAnswer(View):
|
||||
if request.GET['Error'] == "00000":
|
||||
try:
|
||||
with transaction.atomic():
|
||||
b = Basket.objects.filter(id=request.GET['BasketID']).first()
|
||||
b = Basket.objects.select_for_update().filter(id=request.GET['BasketID']).first()
|
||||
if b is None:
|
||||
raise SuspiciousOperation("Basket does not exists")
|
||||
i = Invoice()
|
||||
|
Loading…
Reference in New Issue
Block a user