There is a possible sql injection scenario where I am executing
query = currentHibernateSession.createSQLQuery(sqlQuery);
then i am using query.list()
to execute the query.
Now even though DML queries like DELETE do not work, but DDL queries like drop table go through even though i can see an exception.
A temporary fix would be to parse the sql queries and avoid the DML and DDL queries but i was wondering if there is better way to prevent sql injection in this scenario.