summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-02-20 15:17:06 +0100
committercyBerta <cyberta@riseup.net>2018-02-20 15:17:06 +0100
commitc6c9ca844a50d9469e632a3356389f08e7f6f455 (patch)
tree2b9980121f115bd72ad34e3515b5c2e303191719 /app
parent0e762668e0be37d653d5c65c387eb16be8910f50 (diff)
#8853 show 'It doesn\'t seem to be a Bitmask provider' if entered URL is crap
Diffstat (limited to 'app')
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java2
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
index 24803564..798b6433 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -140,7 +140,7 @@ public class ProviderApiManager extends ProviderApiManagerBase {
else
providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, providerDefinition, dangerOn);
- if (!isValidJson(providerDotJsonString)) {
+ if (ConfigHelper.checkErroneousDownload(providerDotJsonString) || !isValidJson(providerDotJsonString)) {
result.putString(ERRORS, resources.getString(malformed_url));
result.putBoolean(BROADCAST_RESULT_KEY, false);
return result;
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
index de50c170..885d69db 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -123,7 +123,7 @@ public class ProviderApiManager extends ProviderApiManagerBase {
providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, providerDefinition);
}
- if (!isValidJson(providerDotJsonString)) {
+ if (ConfigHelper.checkErroneousDownload(providerDotJsonString) || !isValidJson(providerDotJsonString)) {
setErrorResult(result, malformed_url, null);
return result;
}