Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign updocument (lack of?) risk of SQL injection #229
Comments
This comment has been minimized.
Yes.
I'm not sure we should go too in depth here. Protection from SQL injection attacks is pretty much an assumed feature of any ORM.
None |
This comment has been minimized.
|
Going to close this issue. Please do comment if you still think that there is something actionable to be done here. |
sgrif
closed this
Mar 5, 2016
This comment has been minimized.
astraw
commented
Mar 6, 2016
|
Well given the quote I do think that some documentation (one sentence) somewhere saying that SQL injection is stopped via escaping identifiers at runtime would be useful. |
This comment has been minimized.
|
Again, I think that escaping identifiers and strings (or using prepared statements, which is what we do) would be assumed of all ORMs, but feel free to open a PR and we can discuss the specific changes you'd like to make to the docs. |
astraw commentedFeb 29, 2016
Does diesel automatically escape variables to prevent SQL injection attacks?
I see
escape_identifierfor the postgresRawConnectionand indeed I was apparently unable to hijack my diesel-based interactions with Postgres. That said, I'm not a seasoned attacker, nor did I try with sqlite.I also found a quote claiming that SQL injection attacks are stopped.
Either way, it would be helpful to discuss what measures are taken by diesel and what measures should be taken by the user to prevent SQL injection attacks.