From e06cb3dffb042a6f17e12e52eeeed5ce4c43dc63 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Tue, 17 Mar 2020 15:10:20 +0100 Subject: [PATCH] do not hide password --- src/main/java/de/jalin/ldapadmin/hsadmin/MailboxDAO.java | 4 +++- .../java/de/jalin/ldapadmin/ldap/DirectoryServiceRunner.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/jalin/ldapadmin/hsadmin/MailboxDAO.java b/src/main/java/de/jalin/ldapadmin/hsadmin/MailboxDAO.java index 0d79da7..11333f2 100644 --- a/src/main/java/de/jalin/ldapadmin/hsadmin/MailboxDAO.java +++ b/src/main/java/de/jalin/ldapadmin/hsadmin/MailboxDAO.java @@ -53,7 +53,8 @@ public class MailboxDAO { whereParamsMap.put("name", pac + "-" + localpart); final Object[] rpcResult = (Object[])rpcClient.execute("user.search", xmlRpcParamsList); if (rpcResult.length == 1) { - Map userAsMap = (Map) rpcResult[0]; + @SuppressWarnings("unchecked") + final Map userAsMap = (Map) rpcResult[0]; return (String) userAsMap.get("name"); } throw new MailboxNotFound(); @@ -68,6 +69,7 @@ public class MailboxDAO { setParamsMap.put("name", pac + "-" + localpart); setParamsMap.put("password", pwGen()); setParamsMap.put("comment", comment); + @SuppressWarnings("unused") final Object rpcResult = rpcClient.execute("user.add", xmlRpcParamsList); } diff --git a/src/main/java/de/jalin/ldapadmin/ldap/DirectoryServiceRunner.java b/src/main/java/de/jalin/ldapadmin/ldap/DirectoryServiceRunner.java index 9817015..b689a72 100644 --- a/src/main/java/de/jalin/ldapadmin/ldap/DirectoryServiceRunner.java +++ b/src/main/java/de/jalin/ldapadmin/ldap/DirectoryServiceRunner.java @@ -65,9 +65,9 @@ public class DirectoryServiceRunner { final DirectoryService directoryService = factory.getDirectoryService(); directoryService.setShutdownHookEnabled(true); directoryService.getChangeLog().setEnabled(false); - directoryService.setAccessControlEnabled(true); directoryService.setAllowAnonymousAccess(false); - directoryService.setPasswordHidden(true); + directoryService.setAccessControlEnabled(true); + directoryService.setPasswordHidden(false); return directoryService; }