Skip to content

Commit e66cd05

Browse files
committed
Swift: Improve phrasing around robust escape functions.
1 parent fa898b8 commit e66cd05

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. You can also 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.
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. You can also escape (sanitize) user-controlled strings so that they can be included directly in an SQL command. A library function should be used for escaping, because this approach is only safe if the escaping function is robust against all possible inputs.
1616
</p>
1717

1818
</recommendation>

0 commit comments

Comments
 (0)