Skip to content

Commit

Permalink
Quoting is needed when directive contains a ; or $ #26
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Apr 2, 2022
1 parent f43470d commit 60915c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtualmin-nginx-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ sub join_words
if ($w eq "") {
push(@rv, '""');
}
elsif ($w =~ /\s/ && $w !~ /"/) {
elsif ($w =~ /\s|;|\$/ && $w !~ /"/) {
push(@rv, "\"$w\"");
}
elsif ($w =~ /\s/) {
elsif ($w =~ /\s|;|\$/) {
push(@rv, "'$w'");
}
else {
Expand Down

1 comment on commit 60915c5

@iliajie
Copy link
Contributor

@iliajie iliajie commented on 60915c5 Aug 4, 2022

Choose a reason for hiding this comment

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

This breaks Nginx as it also wraps its variables. Fixed here - fca7001.

Please sign in to comment.