From 4c4bee528edcd98a9f8fdad677a9a9938a7c992d Mon Sep 17 00:00:00 2001 From: stevepodell Date: Thu, 5 Apr 2018 10:31:00 -0700 Subject: [PATCH] InAppBrowser.java: New method isURLWhileListed to check for whitelisting of "AllowedSchemes" in a new preference configuration item. There is a new check in shouldOverrideUrlLoading, to allow whitelisted custom schemes like "mycoolapp://" inappbrowser.js: Added "customscheme" channel. --- src/android/InAppBrowser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index 6682a36..2d9c144 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -1111,8 +1111,8 @@ public class InAppBrowser extends CordovaPlugin { LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString()); } } - // Test for whitelisted custom scheme names, less than 20 chars long, like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response) - else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]{0,20}://.*?$")) { + // Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response) + else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]://.*?$")) { if (allowedSchemes == null) { String allowed = preferences.getString("AllowedSchemes", ""); allowedSchemes = allowed.split(",");