Skip to content

Commit 2ed2a76

Browse files
committed
Swift: Add a note about escaping as an alternative way to fix these issues.
1 parent 2fd4b57 commit 2ed2a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/ql/src/queries/Security/CWE-089/SqlInjection.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If a database query (such as a SQL query) is built from user-provided data witho
1212
<recommendation>
1313

1414
<p>
15-
Most database connector libraries offer a way to safely embed untrusted data into a query using query parameters or prepared statements. You should use these features to build queries, rather than string concatenation or similar methods without sufficient sanitization.
15+
Most database connector libraries offer a way to safely embed untrusted data into a query using query parameters or prepared statements. You should use these features to build queries, rather than string concatenation or similar methods. It's also possible to escape (sanitize) user-controlled strings so that they can be included directly in an SQL command, but this approach is only safe if the chosen escaping function is robust.
1616
</p>
1717

1818
</recommendation>

0 commit comments

Comments
 (0)