Skip to content

Commit

Permalink
Merge pull request #100 from support-project/develop
Browse files Browse the repository at this point in the history
Release v1.11.1
  • Loading branch information
koda-masaru authored Oct 29, 2017
2 parents 29ef7ed + 64bcc83 commit 2454a1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.support-project</groupId>
<artifactId>web</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
<packaging>jar</packaging>

<name>web</name>
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/org/support/project/web/logic/LdapLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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) {
// 認証失敗
Expand Down

0 comments on commit 2454a1f

Please sign in to comment.