fixed missing call to JDBCUtil.escape

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1689 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
elizabeth
2005-08-07 21:54:57 +00:00
parent 223cdd8274
commit b81f4113fc
@@ -176,8 +176,8 @@ public class UserRepository extends JORARepository
public User loadUser (String username)
throws PersistenceException
{
username = StringUtil.replace(username, "'", "\\'");
return loadUserWhere("where username = '" + username + "'");
return loadUserWhere("where username = " +
JDBCUtil.escape(username));
}
/**
@@ -269,8 +269,8 @@ public class UserRepository extends JORARepository
public ArrayList lookupUsersByEmail (String email)
throws PersistenceException
{
final String where = "where email = '" +
StringUtil.replace(email, "'", "\\'") + "'";
final String where = "where email = " +
JDBCUtil.escape(email);
return (ArrayList) execute(new Operation() {
public Object invoke (Connection conn, DatabaseLiaison liaison)
throws PersistenceException, SQLException