diff --git a/pom.xml b/pom.xml
index edf4291..d606492 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.support-project
web
- 1.11.0
+ 1.11.1
jar
web
diff --git a/src/main/java/org/support/project/web/logic/LdapLogic.java b/src/main/java/org/support/project/web/logic/LdapLogic.java
index 88c451c..9abbebe 100644
--- a/src/main/java/org/support/project/web/logic/LdapLogic.java
+++ b/src/main/java/org/support/project/web/logic/LdapLogic.java
@@ -154,9 +154,8 @@ private LdapInfo ldapLogin2(LdapConfigsEntity entity, String id, String password
SearchScope scope = SearchScope.SUBTREE;
cursor = conn.search(base, filter, scope);
String dn = null;
- Entry entry = null;
while (cursor.next()) {
- entry = cursor.get();
+ Entry entry = cursor.get();
dn = entry.getDn().toString();
break;
}
@@ -168,7 +167,14 @@ private LdapInfo ldapLogin2(LdapConfigsEntity entity, String id, String password
conn2 = new LdapNetworkConnection(config);
conn2.bind(dn, password); // Bind DN //Bind Password (接続確認用)
- return loadLdapInfo(entity, entry);
+ cursor = conn2.search(base, filter, scope);
+ LdapInfo info = null;
+ while (cursor.next()) {
+ Entry entry = cursor.get();
+ info = loadLdapInfo(entity, entry);
+ break;
+ }
+ return info;
} catch (LdapException | CursorException | InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException
| BadPaddingException e) {
// 認証失敗