在使用“数据库/SQL"时如何在Go中防止SQL注入攻击?
问题描述:
Building my first web-app and want to understand SQL injection better (https://github.com/astaxie/build-web-application-with-golang/blob/master/en/eBook/09.4.md).
仅通过始终使用数据库/sql"库并使用?"构造查询,我可以获得多少防止SQL注入的保护?而不是包容字符串?在这种情况下,我仍然需要担心哪种SQL注入攻击?
How much protection against SQL injection do I get from just always using the 'database/sql' library and constructing queries using '?' instead of concatting strings? What kind of SQL injection attacks will I still have to worry about in that case?