Skip to content

Commit

Permalink
Remove file extension checking
Browse files Browse the repository at this point in the history
When saving pipeline definition, file_path of steps could be
any file path within the allowed directories. It's not necessary
to reject the request if the file path is not allowed
file extension This allows users to save the path per keystroke.
  • Loading branch information
iannbing committed May 6, 2022
1 parent bfa29db commit f63604b
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions services/orchest-webserver/app/app/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,6 @@ def pipelines_json(project_uuid, pipeline_uuid):
"File is neither in the project, nor in the data directory."
)

extensions = list(
map(lambda x: f".{x.lower()}", ["ipynb", "py", "R", "sh", "jl"])
)

if not step["file_path"].endswith(tuple(extensions)):
raise ValueError("Unsupported pipeline step file type.")

if not step["file_path"].startswith("/"):
step["file_path"] = normalize_project_relative_path(
step["file_path"]
Expand Down

0 comments on commit f63604b

Please sign in to comment.