mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +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":
|
if request.GET['Error'] == "00000":
|
||||||
try:
|
try:
|
||||||
with transaction.atomic():
|
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:
|
if b is None:
|
||||||
raise SuspiciousOperation("Basket does not exists")
|
raise SuspiciousOperation("Basket does not exists")
|
||||||
i = Invoice()
|
i = Invoice()
|
||||||
|
Loading…
Reference in New Issue
Block a user