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

secureserver.pl: fix stunnel path quoting #11721

Closed
wants to merge 1 commit into from
Closed

Conversation

jay
Copy link
Member

@jay jay commented Aug 23, 2023

  • Store the stunnel path in the private variable $stunnel unquoted and instead quote it in the command strings.

Prior to this change the quoted stunnel path was passed to perl's file operators which cannot handle quoted paths. For example:

$stunnel = "\"/C/Program Files (x86)/stunnel/bin/tstunnel\"";
if(-x $stunnel or -x "$stunnel")
# false even if path exists and is executable

Our other test scripts written in perl, unlike this one, use servers.pm which has a global $stunnel variable with the path stored unquoted and therefore those scripts don't have this problem.

Closes #xxxx

- Store the stunnel path in the private variable $stunnel unquoted and
  instead quote it in the command strings.

Prior to this change the quoted stunnel path was passed to perl's file
operators which cannot handle quoted paths. For example:

$stunnel = "\"/C/Program Files (x86)/stunnel/bin/tstunnel\"";
if(-x $stunnel or -x "$stunnel")
# false even if path exists and is executable

Our other test scripts written in perl, unlike this one, use servers.pm
which has a global $stunnel variable with the path stored unquoted and
therefore those scripts don't have this problem.

Closes #xxxx
@nmoinvaz
Copy link
Contributor

LGTM

@jay jay closed this in f2bc51a Aug 28, 2023
@jay jay deleted the stunnel_path branch August 28, 2023 19:14
ptitSeb pushed a commit to wasix-org/curl that referenced this pull request Sep 25, 2023
- Store the stunnel path in the private variable $stunnel unquoted and
  instead quote it in the command strings.

Prior to this change the quoted stunnel path was passed to perl's file
operators which cannot handle quoted paths. For example:

$stunnel = "\"/C/Program Files (x86)/stunnel/bin/tstunnel\"";
if(-x $stunnel or -x "$stunnel")
# false even if path exists and is executable

Our other test scripts written in perl, unlike this one, use servers.pm
which has a global $stunnel variable with the path stored unquoted and
therefore those scripts don't have this problem.

Closes curl#11721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants