Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
if no credentials are provided, set them to something to remind the u…
Browse files Browse the repository at this point in the history
…ser to manually set them
  • Loading branch information
jmazzitelli committed Nov 16, 2015
1 parent cee4a4b commit 1fa17aa
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ private void downloadAgentInstaller(HttpServletRequest req, HttpServletResponse
encode(newProperties, AGENT_INSTALLER_PROPERTY_SECURITY_SECRET, encryptionKey);
}

// if neither username or security key is provided, set them to something to indicate
// to the user that they need to manually set it.
if (newProperties.get(AGENT_INSTALLER_PROPERTY_USERNAME) == null &&
newProperties.get(AGENT_INSTALLER_PROPERTY_SECURITY_KEY) == null) {
newProperties.put(AGENT_INSTALLER_PROPERTY_USERNAME, "SET_ME");
newProperties.put(AGENT_INSTALLER_PROPERTY_PASSWORD, "SET_ME");
newProperties.put(AGENT_INSTALLER_PROPERTY_SECURITY_KEY, null);
newProperties.put(AGENT_INSTALLER_PROPERTY_SECURITY_SECRET, null);
}

int contentLength = 0;

try (ZipFile agentInstallerZip = new ZipFile(agentInstallerJar);
Expand Down

0 comments on commit 1fa17aa

Please sign in to comment.