Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unescaped arguments in websockify command #1741

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tutacat
Copy link

@tutacat tutacat commented Dec 31, 2022

When passing a path with spaces to websockify, it is incorrectly read as multiple arguments, because the args weren't enclosed in quotes.

@tutacat tutacat changed the title Fix unescaped optargs in websockify command Fix unescaped arguments in websockify command Dec 31, 2022
Copy link
Member

@CendioOssman CendioOssman left a comment

Choose a reason for hiding this comment

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

Thank you for your fix!

I'm afraid it isn't entirely correct, though. Please have a look at the comment.

--record) RECORD_ARG="--record ${OPTARG}"; shift ;;
--syslog) SYSLOG_ARG="--syslog ${OPTARG}"; shift ;;
--record) RECORD_ARG='--record "${OPTARG}"'; shift ;;
--syslog) SYSLOG_ARG='--syslog "${OPTARG}"'; shift ;;
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid ' disables variable expansion, so this won't work.

@samhed samhed added this to the v1.5.0 milestone Mar 24, 2023
@samhed
Copy link
Member

samhed commented Jul 24, 2023

@tutacat do you think you will get a chance to fix this?

@CendioOssman
Copy link
Member

This looks better, but unfortunately, it still doesn't work. It is still splitting the words for the record, syslog and auth arguments.

@samhed samhed linked an issue May 17, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to start WebSockets proxy
3 participants