diff --git a/lib/galaxy_test/api/test_proxy.py b/lib/galaxy_test/api/test_proxy.py index cd6a54ba7ae..9fee1690818 100644 --- a/lib/galaxy_test/api/test_proxy.py +++ b/lib/galaxy_test/api/test_proxy.py @@ -52,12 +52,6 @@ class TestProxyApi(ApiTestCase): self._assert_status_code_is(response, 403) assert response.json()["err_msg"] == "Anonymous users are not allowed to access this endpoint" - def test_user_cannot_access_local_file(self): - local_file_url = "file://etc/passwd" - response = self._get(f"proxy?url={local_file_url}") - self._assert_status_code_is(response, 403) - assert response.json()["err_msg"] == "Action requires admin account." - @pytest.mark.parametrize( "invalid_url", [ @@ -65,10 +59,12 @@ class TestProxyApi(ApiTestCase): "http:/missing-slash.com", "//missing-scheme.com", "invalid-url", - "ftp://not-allowed.com", "https://first.url\nhttps://second.url", "https://first.url https://second.url", "https://first.urlhttps://second.url", + # Schemes other than http and https are not allowed + "ftp://not-allowed.com", + "file://etc/passwd", ], ) def test_invalid_url_format(self, invalid_url: str):