I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 831f09c9 authored by zzz's avatar zzz
Browse files

fix corruption of update urls

parent 4f836a20
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,7 @@ public class ConfigUpdateHandler extends FormHandler { ...@@ -104,6 +104,7 @@ public class ConfigUpdateHandler extends FormHandler {
} }
if ( (_updateURL != null) && (_updateURL.length() > 0) ) { if ( (_updateURL != null) && (_updateURL.length() > 0) ) {
_updateURL = _updateURL.replaceAll("\r\n", ",").replaceAll("\n", ",");
String oldURL = _context.router().getConfigSetting(PROP_UPDATE_URL); String oldURL = _context.router().getConfigSetting(PROP_UPDATE_URL);
if ( (oldURL == null) || (!_updateURL.equals(oldURL)) ) { if ( (oldURL == null) || (!_updateURL.equals(oldURL)) ) {
_context.router().setConfigSetting(PROP_UPDATE_URL, _updateURL); _context.router().setConfigSetting(PROP_UPDATE_URL, _updateURL);
......
...@@ -36,7 +36,7 @@ public class ConfigUpdateHelper { ...@@ -36,7 +36,7 @@ public class ConfigUpdateHelper {
public String getUpdateURL() { public String getUpdateURL() {
String url = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_URL); String url = _context.getProperty(ConfigUpdateHandler.PROP_UPDATE_URL);
if (url != null) if (url != null)
return url; return url.replaceAll(",", "\n");
else else
return ConfigUpdateHandler.DEFAULT_UPDATE_URL; return ConfigUpdateHandler.DEFAULT_UPDATE_URL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment