Skip to content

Commit f92d30d

Browse files
Jarrad Whitakerbarklan
authored andcommitted
add example of misfiring
1 parent 8b89af6 commit f92d30d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/testdata/multiline.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ as one even though --sql comment is not present.
1717
Also, I hate manual testing.;
1818
`
1919

20+
notQuery2 := `
21+
this is really not a query, but we do demonstrate the only known issue
22+
with this approach, where an in-string sql keyword will make the sql injection
23+
mis-fire.
24+
`
25+
2026
more := `--sql
2127
select * from book where id = 34;
2228
`
@@ -42,7 +48,7 @@ select * from book where id = 34;
4248
)
4349
`
4450

45-
print(query, another, more, notQuery, more2, more3, more4, more5, more6, more7)
51+
print(query, another, more, notQuery, notQuery2, more2, more3, more4, more5, more6, more7)
4652
}
4753

4854
func add(a, b int) int {

0 commit comments

Comments
 (0)