Compare commits

..

No commits in common. "27710e92afb227cfb0e5662d3ebef53d022dbe48" and "a3c3ee0fe00a240625b01b9cfe65d7ebb553d8d9" have entirely different histories.

View File

@ -106,15 +106,9 @@ public class AccountMgr {
String[] pwH = {"email"};
String[] pwD = {email};
List<String> foundEmail = Database.select("user",pwH,pwD);
String salt;
if(foundEmail.size() == 1){
String[] userParts = foundEmail.get(0).split(":");
String[] pwParts = userParts[4].split("\\.");
salt = pwParts[1];
}else{
//no unique user found; still calculating a hash for security reasons
salt = getSalt();
}
String[] userParts = foundEmail.get(0).split(":");
String[] pwParts = userParts[4].split("\\.");
String salt = pwParts[1];
String[] userH = {"email","password"};
String[] userD = {email,hashAndSalt(pw,salt)};
return Database.getSingleId("user",userH,userD);