setProxyProperties(startupProxyProperties[0], startupProxyProperties[1],
startupProxyProperties[2], startupProxyProperties[3],
startupProxyProperties[4],
- startupProxyProperties[5].toCharArray(),
+ startupProxyProperties[5] == null ? null
+ : startupProxyProperties[5].toCharArray(),
startupProxyProperties[6],
- startupProxyProperties[7].toCharArray(),
+ startupProxyProperties[7] == null ? null
+ : startupProxyProperties[7].toCharArray(),
startupProxyProperties[8]);
StringBuilder sb = new StringBuilder();
sb.append("Setting proxy properties to: http.proxyHost=")
{
try
{
+ char[] displayHttpPw = new char[httpPassword == null ? 0
+ : httpPassword.length];
+ Arrays.fill(displayHttpPw, '*');
Cache.debug("CACHE Proxy: setting new Authenticator with httpUser='"
- + httpUser + "' httpPassword='"
- + (proxyAuthPassword == null ? "null"
- : new String(proxyAuthPassword))
- + "'"); // DELETE THIS LINE (password in logs)
+ + httpUser + "' httpPassword='" + displayHttpPw + "'");
Authenticator.setDefault(new Authenticator()
{
@Override
.getString("label.proxy_password_required");
Preferences.openPreferences(Preferences.CONNECTIONS_TAB,
message);
- Preferences.getPreferences().proxyAuthPasswordFocus();
+ Preferences.getInstance().proxyAuthPasswordHighlight(true);
}
else
{
&& getRequestingPort() == Integer
.valueOf(httpPort))
{
- char[] displayHttpPw = new char[httpPassword.length];
- Arrays.fill(displayHttpPw, '*');
Cache.debug(
"AUTHENTICATOR returning PasswordAuthentication(\""
+ httpUser + "\", '"
{
// reset the Authenticator to protect http.proxyUser and
// http.proxyPassword Just In Case
+ /* as noted above, due to bug in java this doesn't work if the sun.net.www.protocol.http.AuthCache
+ * has working credentials. No workaround for Java 11.
+ */
Cache.debug("AUTHENTICATOR setting default Authenticator to null");
Authenticator.setDefault(null);
}