mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Bug fix for importing a history archive.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user