1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Update default HTTP configurations to use HTTPS

This commit is contained in:
Lode Hoste 2015-04-09 20:04:50 +02:00
parent 5e0029e208
commit bcbec555cd
2 changed files with 10 additions and 6 deletions

View file

@ -142,6 +142,16 @@ public class ConfigXml {
}
}
// Enforce TLS.
Element gui = (Element) mConfig.getDocumentElement()
.getElementsByTagName("gui").item(0);
boolean tls = Boolean.parseBoolean(gui.getAttribute("tls"));
if (!tls) {
Log.i(TAG, "Enforce TLS");
gui.setAttribute("tls", Boolean.toString(true));
changed = true;
}
// Update deprecated 8080 port to 8384
NodeList addressList = gui.getElementsByTagName("address");
for (int i = 0; i < addressList.getLength(); i++) {

View file

@ -100,12 +100,6 @@
android:key="gui_password"
android:title="@string/gui_password" />
<CheckBoxPreference
android:key="UseTLS"
android:title="@string/gui_https_enabled"
android:enabled="false"
android:persistent="false" />
</PreferenceScreen>
<Preference