mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 19:25:13 +01:00
Fix unclosed Statement object.
This commit is contained in:
parent
35d73b2d4a
commit
ee3fe45d7f
@ -283,10 +283,9 @@ public class MySQL implements DataSource {
|
|||||||
if (!rs.next()) {
|
if (!rs.next()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String salt = !columnSalt.isEmpty() ? rs.getString(columnSalt) : "";
|
String salt = !columnSalt.isEmpty() ? rs.getString(columnSalt) : "";
|
||||||
int group = !salt.isEmpty() && !columnGroup.isEmpty() ? rs.getInt(columnGroup) : -1;
|
int group = !salt.isEmpty() && !columnGroup.isEmpty() ? rs.getInt(columnGroup) : -1;
|
||||||
|
int id = rs.getInt(columnID);
|
||||||
pAuth = PlayerAuth.builder()
|
pAuth = PlayerAuth.builder()
|
||||||
.name(rs.getString(columnName))
|
.name(rs.getString(columnName))
|
||||||
.realName(rs.getString(columnRealName))
|
.realName(rs.getString(columnRealName))
|
||||||
@ -301,11 +300,9 @@ public class MySQL implements DataSource {
|
|||||||
.salt(salt)
|
.salt(salt)
|
||||||
.groupId(group)
|
.groupId(group)
|
||||||
.build();
|
.build();
|
||||||
|
rs.close();
|
||||||
|
pst.close();
|
||||||
if (Settings.getPasswordHash == HashAlgorithm.XENFORO) {
|
if (Settings.getPasswordHash == HashAlgorithm.XENFORO) {
|
||||||
int id = rs.getInt(columnID);
|
|
||||||
rs.close();
|
|
||||||
pst.close();
|
|
||||||
pst = con.prepareStatement("SELECT data FROM xf_user_authenticate WHERE " + columnID + "=?;");
|
pst = con.prepareStatement("SELECT data FROM xf_user_authenticate WHERE " + columnID + "=?;");
|
||||||
pst.setInt(1, id);
|
pst.setInt(1, id);
|
||||||
rs = pst.executeQuery();
|
rs = pst.executeQuery();
|
||||||
|
Loading…
Reference in New Issue
Block a user