Compare commits
No commits in common. "27710e92afb227cfb0e5662d3ebef53d022dbe48" and "a3c3ee0fe00a240625b01b9cfe65d7ebb553d8d9" have entirely different histories.
27710e92af
...
a3c3ee0fe0
@ -106,15 +106,9 @@ public class AccountMgr {
|
|||||||
String[] pwH = {"email"};
|
String[] pwH = {"email"};
|
||||||
String[] pwD = {email};
|
String[] pwD = {email};
|
||||||
List<String> foundEmail = Database.select("user",pwH,pwD);
|
List<String> foundEmail = Database.select("user",pwH,pwD);
|
||||||
String salt;
|
|
||||||
if(foundEmail.size() == 1){
|
|
||||||
String[] userParts = foundEmail.get(0).split(":");
|
String[] userParts = foundEmail.get(0).split(":");
|
||||||
String[] pwParts = userParts[4].split("\\.");
|
String[] pwParts = userParts[4].split("\\.");
|
||||||
salt = pwParts[1];
|
String salt = pwParts[1];
|
||||||
}else{
|
|
||||||
//no unique user found; still calculating a hash for security reasons
|
|
||||||
salt = getSalt();
|
|
||||||
}
|
|
||||||
String[] userH = {"email","password"};
|
String[] userH = {"email","password"};
|
||||||
String[] userD = {email,hashAndSalt(pw,salt)};
|
String[] userD = {email,hashAndSalt(pw,salt)};
|
||||||
return Database.getSingleId("user",userH,userD);
|
return Database.getSingleId("user",userH,userD);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user