From 320e4f544656ad43e4acd18644da8b68f7868dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Wisniewski?= <gregory@nexedi.com> Date: Wed, 3 Feb 2010 16:32:30 +0000 Subject: [PATCH] Check 'tid' parameter, must match with current transaction. git-svn-id: https://svn.erp5.org/repos/neo/trunk@1624 71dcc9de-d417-0410-9af5-da40c76e7ee4 --- neo/client/handlers/storage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neo/client/handlers/storage.py b/neo/client/handlers/storage.py index 0ea5e602..bf62e70e 100644 --- a/neo/client/handlers/storage.py +++ b/neo/client/handlers/storage.py @@ -77,8 +77,9 @@ class StorageAnswersHandler(AnswerBaseHandler): self.app.local_var.object_stored = oid, serial def answerStoreTransaction(self, conn, tid): - app = self.app - app.setTransactionVoted() + if tid != self.app.getTID(): + raise ProtocolError('Wrong TID, transaction not started') + self.app.setTransactionVoted() def answerTransactionInformation(self, conn, tid, user, desc, ext, oid_list): -- 2.30.9