Skip to content

Commit dd9aba3

Browse files
Fix grammar problem (thanks to Ashwin for noting it)
Signed-off-by: David A. Wheeler <[email protected]>
1 parent 501715a commit dd9aba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

secure_software_development_fundamentals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ For example, in Python, if you need to write to a user-provided table name, you
25462546

25472547
Many programs use object-relational mapping (ORM). This is just a technique to automatically convert data in a relational database into an object in an object-oriented programming language and back; lots of libraries and frameworks will do this for you. This is fine, as long as the ORM is implemented using parameterized statements or something equivalent to them. In practice, any good ORM implementation will do so. So if you are using a respected ORM, you are already doing this. That said, it is common in systems that use ORMs to occasionally need to use SQL queries directly… and when you do, use parameterized statements or prepared statements.
25482548

2549-
Some applications use a "query builder" library to build commands (queries) programmatically through a sequence of calls instead of embedding a command string. Some ORMs include a query builder system. Again, a well-implemented query builder will use parameterized statements or similar internally. So if you use a query builder, use one that is implemented using parameterized statements and provides untrusted data as separate parameters however in the query builder requires for them to be correctly escaped.
2549+
Some applications use a "query builder" library to build commands (queries) programmatically through a sequence of calls instead of embedding a command string. Some ORMs include a query builder system. Again, a well-implemented query builder will use parameterized statements or similar internally. So if you use a query builder, use one that is implemented using parameterized statements, and provide untrusted data as separate parameters so the query builder can use the parameterized statements correctly.
25502550

25512551
There are other approaches, of course. You can write your own escape code, but this is difficult to get correct, and typically a waste of time since there are usually existing libraries to do the job.
25522552

0 commit comments

Comments
 (0)