Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/ayon_core/lib/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,15 @@ def run_subprocess(*args, **kwargs):
and isinstance(args[0], str)
):
# Escape parentheses for bash
if os.getenv("SHELL") in ("/bin/bash", "/bin/sh"):
if platform.system().lower() != "windows":
new_arg = (
args[0]
.replace("&", "\\&")
.replace(";", "\\;")
.replace("|", "\\|")
.replace("$", "\\$")
.replace(">", "\\>")
Comment on lines +122 to +126

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kalisp is this something you can validate?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing it on uploading video_v001_b&w.mp4 via Webpublisher service (which is running on Linux). Tray publisher on Linux/MacOS would do the trick too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use shell=False if that's what you're asking for?

.replace("<", "\\<")
.replace("(", "\\(")
.replace(")", "\\)")
)
Expand Down
Loading