SQL Injection
SQL注入攻击
错误的示范
createQuery("SELECT * from Stuff WHERE type=" + theType;
请使用
createQuery("SELECT * from Stuff WHERE type= ?1").setParameter(1, theType);
等等
未完待续。。。
SQL注入攻击
错误的示范
createQuery("SELECT * from Stuff WHERE type=" + theType;
请使用
createQuery("SELECT * from Stuff WHERE type= ?1").setParameter(1, theType);
等等
未完待续。。。