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