Skip to content

Commit eef8806

Browse files
(GH-14) Fixed here-doc terminators.
The closing terminator should not include quotes/backticks/etc, or it will not be detected as a valid closing terminator and be included in the heredoc() output instead, which is the real cause of the issues we've seen in GH-14.
1 parent 4895e8a commit eef8806

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/ValuesAndExpressions/PreventSQLInjection.run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ __HERE__
120120
my $heredoc = <<"HERE"
121121
SELECT
122122
FROM $table
123-
"HERE"
123+
HERE
124124

125125
## name Double-quoted heredoc with multiple variables.
126126
## failures 1
@@ -129,7 +129,7 @@ my $heredoc = <<"HERE"
129129
my $heredoc = <<"HERE"
130130
SELECT $field_name
131131
FROM $table
132-
"HERE"
132+
HERE
133133

134134
## name Single-quoted heredoc with multiple variables.
135135
## failures 0
@@ -138,7 +138,7 @@ my $heredoc = <<"HERE"
138138
my $heredoc = <<'HERE'
139139
SELECT $field_name
140140
FROM $table
141-
'HERE'
141+
HERE
142142

143143
## name Heredoc with multiple variables (whitelisted).
144144
## failures 0

0 commit comments

Comments
 (0)