cheese1756
cheese1756

Reputation: 1969

Does SQLiteDatabase.insert() prevent SQL injection attacks?

I've checked the documentation, but I didn't see it address SQL injections. Does the insert() method automatically prevent injections, or must they be prevented manually? Thanks.

Upvotes: 0

Views: 2794

Answers (1)

sassospicco
sassospicco

Reputation: 78

Android API calls SQLite native library to bind parameters. So, assuming the prepared statements are correctly written, queries are safe.

Relevant source code:

Upvotes: 3

Related Questions