@@ -9,7 +9,7 @@ Code that constructs a quoted string literal containing user-provided data needs
9
9
this data does not itself contain a quote. Otherwise the embedded data could (accidentally or
10
10
intentionally) terminate the string literal early and thereby change the structure of the overall
11
11
string, with potentially severe consequences. If, for example, the string is later used as
12
- part an operating-system command or database query, an attacker may be able to craft input data
12
+ part of an operating-system command or database query, an attacker may be able to craft input data
13
13
that injects a malicious command.
14
14
</p >
15
15
</overview >
@@ -18,7 +18,7 @@ that injects a malicious command.
18
18
<p >
19
19
Sanitize the embedded data appropriately to ensure quotes are escaped, or use an API that does
20
20
not rely on manually constructing quoted substrings. Make sure to use the appropriate escaping
21
- mechanism, for example double quoting for SQL strings or backslash escaping for shell commands.
21
+ mechanism, for example, double quoting for SQL strings or backslash escaping for shell commands.
22
22
When using backslash escaping, the backslash character itself must also be escaped.
23
23
</p >
24
24
</recommendation >
@@ -42,7 +42,7 @@ queries, which avoids the need to explicitly construct a quoted string.
42
42
</p >
43
43
<sample src =" StringBreakGood.go" />
44
44
<p >
45
- In situations where a structured API is not available, make sure to escape quotes before embedding
45
+ In situations where a structured API is not available, make sure that you escape quotes before embedding
46
46
user-provided data into a quoted string. For example, this is how you can backslash-escape single
47
47
quotes using <code >strings.ReplaceAll</code >:
48
48
</p >
0 commit comments