From 6f56783bc69df4a70502a2c5d62fd4f3fe441e14 Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Wed, 5 Jul 2006 09:00:26 +0000 Subject: [PATCH] - Revert was broken since I added the security asked by Yoshinori. I fixed the problem, it should work now. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8313 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Subversion/Tool/SubversionTool.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/product/ERP5Subversion/Tool/SubversionTool.py b/product/ERP5Subversion/Tool/SubversionTool.py index 6290959999..e6a08f4278 100644 --- a/product/ERP5Subversion/Tool/SubversionTool.py +++ b/product/ERP5Subversion/Tool/SubversionTool.py @@ -879,10 +879,12 @@ class SubversionTool(BaseTool, UniqueObject, Folder): added_files = [added_files] if not isinstance(other_files, list) : other_files = [other_files] - + # Reinstall removed or modified files for path in other_files : - path_list = self._getWorkingPath(self.relativeToAbsolute(path, business_template)).split(os.sep) + # security check + self._getWorkingPath(self.relativeToAbsolute(path, business_template)) + path_list = path.split(os.sep) if 'bt' not in path_list: if len(path_list) > 2 : tmp = os.sep.join(path_list[2:]) @@ -892,7 +894,9 @@ class SubversionTool(BaseTool, UniqueObject, Folder): path_added_list = [] # remove added files for path in added_files : - path_list = self._getWorkingPath(self.relativeToAbsolute(path, business_template)).split(os.sep) + # security check + self._getWorkingPath(self.relativeToAbsolute(path, business_template)) + path_list = path.split(os.sep) if 'bt' not in path_list: if len(path_list) > 2 : tmp = os.sep.join(path_list[2:]) -- 2.30.9