Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 131 by
lukasz...@gmail.com: PageQueryIterable doesn't escape
special characters
https://code.google.com/p/jwpl/issues/detail?id=131
What steps will reproduce the problem?
1. Create PageQuery object with title pattern containing quote character
(').
2. Invoke wikipedia.getPages(pageQuery).
What is the expected output? What do you see instead?
I'm getting hibernate exception saying nested transaction is not supported.
What version of the product are you using? On what operating system?
1.0
Please provide any additional information below.
In PageQueryIterable class, the SQL query shouldn't be created by
concatenating some strings. I have fixed this issue myself temporarily by
using query with named parameters and then binding them to proper values
from PageQuery object. I'm pasting the code change below:
...
String hql = "select p.pageId from Page as p where
p.name like :name";
Query q = session.createQuery(hql);
q.setParameter("name", query.getTitlePattern());
pageIdList = q.list();
...
Note I need only title pattern field in the HQL query.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings