Clean files and catch file path escape. Ref #1894

This commit is contained in:
grossmj
2021-05-15 22:35:44 +09:30
parent 09ac7fd7fb
commit f3d81fa450
19 changed files with 44 additions and 601 deletions

View File

@ -240,6 +240,7 @@ async def test_get_file(app: FastAPI, client: AsyncClient, project: Project, com
response = MagicMock()
response.body = b"world"
response.status = status.HTTP_200_OK
compute.http_query = AsyncioMagicMock(return_value=response)
response = await client.get(app.url_path_for("get_file", project_id=project.id, node_id=node.id, file_path="hello"))