Is JDBC secure?

前端 未结 6 988
说谎
说谎 2020-12-10 09:27

I am new to JDBC, and the new project require me to use JDBC. What I want to know is,

is the JDBC secure?

How to prevent \"Mysql Injection\"-like problem?<

6条回答
  •  盖世英雄少女心
    2020-12-10 09:52

    Or you can use the utility method: "org.apache.commons.lang.StringEscapeUtils.escapeSql(java.lang.String str)" to prevent sql-injection from happening.

    String sanitation is always be best policy to prevent sql-injection or cross-site-scripting attacks.

提交回复
热议问题