Commit eb522836572aab21c54df8485a91a3e6620bf5d1

Authored by tfmoraes
1 parent ebbb5b0a

A applied a patch from Paulo Andrade, to avoid /tmp possible exploit or race condition.

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
invesalius/project.py
@@ -261,7 +261,7 @@ class Project(object): @@ -261,7 +261,7 @@ class Project(object):
261 ow = vtk.vtkOutputWindow() 261 ow = vtk.vtkOutputWindow()
262 ow.SetInstance(fow) 262 ow.SetInstance(fow)
263 263
264 - filelist = Extract(filename, tempfile.gettempdir()) 264 + filelist = Extract(filename, tempfile.mkdtemp())
265 main_plist = min(filter(lambda x: x.endswith('.plist'), filelist), 265 main_plist = min(filter(lambda x: x.endswith('.plist'), filelist),
266 key=lambda x: len(x)) 266 key=lambda x: len(x))
267 project = plistlib.readPlist(main_plist) 267 project = plistlib.readPlist(main_plist)