hibernate - SQL Injection Issue -- getHibernateTemplate().delete(getObject(objectClass,objectId)) method -


i fixing code audit report security issue-- sql injection. in code following method used extensively delete records. method defined in base class , extended every other dao level class in module.

public void delete(class objectclass, long objectid)throws daoexception{         try{             gethibernatetemplate().delete(getobject(objectclass,objectid));         }catch(exception e){             throw new daoexception(e);         }     } 

and, method call gethibernatetemplate().delete(getobject(objectclass,objectid));

is reported prone sql injection. reported like

"injection of data received servlet request ("getobject(objectclass,objectid)") user defined dangerous".

how fix issue. have done sufficient homework , had fixed more sql injection issue prepared statement in hql.

thanks in advance.

answer -- method in use binding parameters , can verified log4j api. have verified logs binding parameters , sql injection issue not feasible


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -