logoalt Hacker News

Write Transactions Are a Footgun with Rust's SQLx and SQLite

9 pointsby emschwartztoday at 6:33 PM2 commentsview on HN

Comments

yellowappletoday at 10:19 PM

> However, this can lead to catastrophic SQL injection attacks if you use this for user input, because raw_sql does not support binding and sanitizing query parameters.

That's surprising, given that SQLite itself supports binding and sanitizing query parameters via sqlite_bind_*(). Is SQLx just blindly calling sqlite3_exec() instead of doing the prepare→bind→step→finalize sequence itself?

show 1 reply