From bc1181e83ea8883f56c6ad29d33072c0b2ef3685 Mon Sep 17 00:00:00 2001 From: jacobtr Date: Wed, 1 Mar 2023 14:27:27 +0100 Subject: [PATCH] (feat) #6 Makes sure the password is not saved in registry No ui changes in this commit, leaves password field empty on launch --- src/main/java/org/jabref/preferences/JabRefPreferences.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/preferences/JabRefPreferences.java b/src/main/java/org/jabref/preferences/JabRefPreferences.java index 3ea8f83a45b..b0a712eab29 100644 --- a/src/main/java/org/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/org/jabref/preferences/JabRefPreferences.java @@ -1545,21 +1545,19 @@ public ProxyPreferences getProxyPreferences() { if (Objects.nonNull(proxyPreferences)) { return proxyPreferences; } - proxyPreferences = new ProxyPreferences( getBoolean(PROXY_USE), get(PROXY_HOSTNAME), get(PROXY_PORT), getBoolean(PROXY_USE_AUTHENTICATION), get(PROXY_USERNAME), - get(PROXY_PASSWORD)); + (String) defaults.get(PROXY_PASSWORD)); EasyBind.listen(proxyPreferences.useProxyProperty(), (obs, oldValue, newValue) -> putBoolean(PROXY_USE, newValue)); EasyBind.listen(proxyPreferences.hostnameProperty(), (obs, oldValue, newValue) -> put(PROXY_HOSTNAME, newValue)); EasyBind.listen(proxyPreferences.portProperty(), (obs, oldValue, newValue) -> put(PROXY_PORT, newValue)); EasyBind.listen(proxyPreferences.useAuthenticationProperty(), (obs, oldValue, newValue) -> putBoolean(PROXY_USE_AUTHENTICATION, newValue)); EasyBind.listen(proxyPreferences.usernameProperty(), (obs, oldValue, newValue) -> put(PROXY_USERNAME, newValue)); - EasyBind.listen(proxyPreferences.passwordProperty(), (obs, oldValue, newValue) -> put(PROXY_PASSWORD, newValue)); return proxyPreferences; }