mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
12.42.2008 767566ab469a678a9aa774b2170e2be39e044a20
Fix for issue 2924 (setup leaves root user password in  a world readable file)

Instead of printing the password print the string "{rootUserPassword}" in the log file.
1 files modified
9 ■■■■■ changed files
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java 9 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/Installer.java
@@ -873,14 +873,23 @@
    final String[] args = new String[argList.size()];
    argList.toArray(args);
    StringBuilder cmd = new StringBuilder();
    boolean nextPassword = false;
    for (String s : argList)
    {
      if (cmd.length() > 0)
      {
        cmd.append(" ");
      }
      if (nextPassword)
      {
        cmd.append("{rootUserPassword}");
      }
      else
      {
      cmd.append(s);
    }
      nextPassword = s.equals("-w");
    }
    LOG.log(Level.INFO, "configure DS cmd: "+cmd);
    final InstallerHelper helper = new InstallerHelper();
    setNotifyListeners(false);