From 5059a3d01b6a8bde3f2d50558062ef09320f1e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sieradzki?= Date: Tue, 3 Nov 2015 22:28:07 +0100 Subject: [PATCH] Fix methods from SHelper Both Google and Facebook force HTTPS-only traffic for years. --- .../main/java/acr/browser/lightning/reading/SHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/acr/browser/lightning/reading/SHelper.java b/app/src/main/java/acr/browser/lightning/reading/SHelper.java index 7293f3a..1554ed7 100644 --- a/app/src/main/java/acr/browser/lightning/reading/SHelper.java +++ b/app/src/main/java/acr/browser/lightning/reading/SHelper.java @@ -251,8 +251,8 @@ class SHelper { } public static String getUrlFromUglyGoogleRedirect(String url) { - if (url.startsWith("http://www.google.com/url?")) { - url = url.substring("http://www.google.com/url?".length()); + if (url.startsWith("https://www.google.com/url?")) { + url = url.substring("https://www.google.com/url?".length()); String arr[] = urlDecode(url).split("&"); for (String str : arr) { if (str.startsWith("q=")) @@ -264,8 +264,8 @@ class SHelper { } public static String getUrlFromUglyFacebookRedirect(String url) { - if (url.startsWith("http://www.facebook.com/l.php?u=")) { - url = url.substring("http://www.facebook.com/l.php?u=".length()); + if (url.startsWith("https://www.facebook.com/l.php?u=")) { + url = url.substring("https://www.facebook.com/l.php?u=".length()); return urlDecode(url); }