From 02be5e162964ab629b9bed1e575eb4aabca9ab0a Mon Sep 17 00:00:00 2001 From: Skia Date: Tue, 22 Nov 2016 17:04:12 +0100 Subject: [PATCH] Protect query on Eboutic to prevend double basket validation --- eboutic/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eboutic/views.py b/eboutic/views.py index 79a4cb32..7241955b 100644 --- a/eboutic/views.py +++ b/eboutic/views.py @@ -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()