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:
@@ -176,8 +176,8 @@ public class UserRepository extends JORARepository
|
|||||||
public User loadUser (String username)
|
public User loadUser (String username)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
username = StringUtil.replace(username, "'", "\\'");
|
return loadUserWhere("where username = " +
|
||||||
return loadUserWhere("where username = '" + username + "'");
|
JDBCUtil.escape(username));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -269,8 +269,8 @@ public class UserRepository extends JORARepository
|
|||||||
public ArrayList lookupUsersByEmail (String email)
|
public ArrayList lookupUsersByEmail (String email)
|
||||||
throws PersistenceException
|
throws PersistenceException
|
||||||
{
|
{
|
||||||
final String where = "where email = '" +
|
final String where = "where email = " +
|
||||||
StringUtil.replace(email, "'", "\\'") + "'";
|
JDBCUtil.escape(email);
|
||||||
return (ArrayList) execute(new Operation() {
|
return (ArrayList) execute(new Operation() {
|
||||||
public Object invoke (Connection conn, DatabaseLiaison liaison)
|
public Object invoke (Connection conn, DatabaseLiaison liaison)
|
||||||
throws PersistenceException, SQLException
|
throws PersistenceException, SQLException
|
||||||
|
|||||||
Reference in New Issue
Block a user