summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorHDA (OpenERP) <hda@tinyerp.com>2009-10-21 12:54:49 +0530
committerHDA (OpenERP) <hda@tinyerp.com>2009-10-21 12:54:49 +0530
commitb7f6bc4c8e2996b7ffdb881835ccb0b9d4f556d1 (patch)
tree162d1210beee282ca0837cfd9ed90a0edd29fdd9 /addons/document/document.py
parent251b6720cac31cc62b1e09544c317757fd274ef4 (diff)
Remove sql injection problem
lp bug: https://launchpad.net/bugs/429327 fixed bzr revid: hda@tinyerp.com-20091021072449-rc9usc422tb0kv2f
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 8c88be59858..10b49ecabe9 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -301,7 +301,7 @@ class document_directory(osv.osv):
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
- cr.execute('select distinct parent_id from document_directory where id in ('+','.join(map(str,ids))+')')
+ cr.execute('select distinct parent_id from document_directory where id in ('+','.join(map(str, ids))+')')
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@@ -523,7 +523,7 @@ class document_file(osv.osv):
def _data_get(self, cr, uid, ids, name, arg, context):
result = {}
- cr.execute('select id,store_fname,link from ir_attachment where id in ('+','.join(map(str,ids))+')')
+ cr.execute('select id,store_fname,link from ir_attachment where id in ('+','.join(map(str, ids))+')')
for id,r,l in cr.fetchall():
try:
value = file(os.path.join(self._get_filestore(cr), r), 'rb').read()