Bug fix for importing a history archive.

This commit is contained in:
Jeremy Goecks
2010-06-03 17:04:31 -04:00
parent 92588a9004
commit 6f8aaecaa6
+1 -1
View File
@@ -454,7 +454,7 @@ class HistoryController( BaseController, Sharable, UsesAnnotations, UsesHistory
# Security check: make sure that members are relative, not absolute.
for tarinfo in history_archive_file.getmembers():
if tarinfo.name.startswith("/") or tarinfo.name.startswith(".."):
if tarinfo.name.startswith("/") or tarinfo.name.find("..") != -1:
return trans.show_error_message( 'Error importing history archive: archive file is invalid.' )
# Unpack archive in temporary directory.