From 5beb876b6e420f739b8fcf81ba6310cd09ffbc66 Mon Sep 17 00:00:00 2001 From: Arash Date: Mon, 22 Jul 2024 18:07:01 +0200 Subject: [PATCH 1/3] Fix encoding issue in ZipstreamWrapper --- lib/galaxy/util/zipstream.py | 3 ++- lib/galaxy_test/api/test_dataset_collections.py | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/util/zipstream.py b/lib/galaxy/util/zipstream.py index 0b23796482be..1cd1c77649e7 100644 --- a/lib/galaxy/util/zipstream.py +++ b/lib/galaxy/util/zipstream.py @@ -41,7 +41,8 @@ def response(self) -> Iterator[bytes]: def get_headers(self) -> Dict[str, str]: headers = {} if self.archive_name: - headers["Content-Disposition"] = f'attachment; filename="{self.archive_name}.zip"' + archive_name = self.archive_name.encode("latin-1", "replace").decode("latin-1") + headers["Content-Disposition"] = f'attachment; filename="{archive_name}.zip"' if self.upstream_mod_zip: headers["X-Archive-Files"] = "zip" else: diff --git a/lib/galaxy_test/api/test_dataset_collections.py b/lib/galaxy_test/api/test_dataset_collections.py index 85b0652c0259..c9428ad84ffe 100644 --- a/lib/galaxy_test/api/test_dataset_collections.py +++ b/lib/galaxy_test/api/test_dataset_collections.py @@ -182,6 +182,14 @@ def test_list_list_list_download(self): namelist = archive.namelist() assert len(namelist) == 3, f"Expected 3 elements in [{namelist}]" + def test_download_non_english_characters(self): + with self.dataset_populator.test_history() as history_id: + name = "دیتاست" + payload = self.dataset_collection_populator.create_list_payload(history_id, name=name) + hdca_id = self.dataset_populator.fetch(payload, wait=True).json()["outputs"][0]["id"] + create_response = self._download_dataset_collection(history_id=history_id, hdca_id=hdca_id) + self._assert_status_code_is(create_response, 200) + @requires_new_user def test_hda_security(self): with self.dataset_populator.test_history(require_new=False) as history_id: From f745aa7906fc404c7eed9d2c486b99ef2724add9 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Wed, 24 Jul 2024 11:29:40 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8:=20add=20eye=20icon=20to=20reveal?= =?UTF-8?q?=20API=20key=20and=20remove=20mouse=20over=20in=20`APIKeyItem`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/User/APIKey/APIKeyItem.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/client/src/components/User/APIKey/APIKeyItem.vue b/client/src/components/User/APIKey/APIKeyItem.vue index dd398af9b979..0ad915b730d0 100644 --- a/client/src/components/User/APIKey/APIKeyItem.vue +++ b/client/src/components/User/APIKey/APIKeyItem.vue @@ -1,10 +1,15 @@