From 6f8aaecaa6c7743eda8069f8399244bd91edef58 Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Thu, 3 Jun 2010 17:04:31 -0400 Subject: [PATCH] Bug fix for importing a history archive. --- lib/galaxy/web/controllers/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/web/controllers/history.py b/lib/galaxy/web/controllers/history.py index 9ad7d02b54a..5a804a8724b 100644 --- a/lib/galaxy/web/controllers/history.py +++ b/lib/galaxy/web/controllers/history.py @@ -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.