Skip to content

secureserver.pl: fix stunnel path quoting#11721

Closed
jay wants to merge 1 commit intocurl:masterfrom
jay:stunnel_path
Closed

secureserver.pl: fix stunnel path quoting#11721
jay wants to merge 1 commit intocurl:masterfrom
jay:stunnel_path

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.

2 participants