Skip to content

Commit 2454a1f

Browse files
authored
Merge pull request #100 from support-project/develop
Release v1.11.1
2 parents 29ef7ed + 64bcc83 commit 2454a1f

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>org.support-project</groupId>
66
<artifactId>web</artifactId>
7-
<version>1.11.0</version>
7+
<version>1.11.1</version>
88
<packaging>jar</packaging>
99

1010
<name>web</name>

src/main/java/org/support/project/web/logic/LdapLogic.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ private LdapInfo ldapLogin2(LdapConfigsEntity entity, String id, String password
154154
SearchScope scope = SearchScope.SUBTREE;
155155
cursor = conn.search(base, filter, scope);
156156
String dn = null;
157-
Entry entry = null;
158157
while (cursor.next()) {
159-
entry = cursor.get();
158+
Entry entry = cursor.get();
160159
dn = entry.getDn().toString();
161160
break;
162161
}
@@ -168,7 +167,14 @@ private LdapInfo ldapLogin2(LdapConfigsEntity entity, String id, String password
168167
conn2 = new LdapNetworkConnection(config);
169168
conn2.bind(dn, password); // Bind DN //Bind Password (接続確認用)
170169

171-
return loadLdapInfo(entity, entry);
170+
cursor = conn2.search(base, filter, scope);
171+
LdapInfo info = null;
172+
while (cursor.next()) {
173+
Entry entry = cursor.get();
174+
info = loadLdapInfo(entity, entry);
175+
break;
176+
}
177+
return info;
172178
} catch (LdapException | CursorException | InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException
173179
| BadPaddingException e) {
174180
// 認証失敗

0 commit comments

Comments
 (0)