Skip to content

Commit 4c4bee5

Browse files
committed
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.
1 parent 019ec39 commit 4c4bee5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android/InAppBrowser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,8 @@ else if (url.startsWith("sms:")) {
11111111
LOG.e(LOG_TAG, "Error sending sms " + url + ":" + e.toString());
11121112
}
11131113
}
1114-
// Test for whitelisted custom scheme names, less than 20 chars long, like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
1115-
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]{0,20}://.*?$")) {
1114+
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
1115+
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]://.*?$")) {
11161116
if (allowedSchemes == null) {
11171117
String allowed = preferences.getString("AllowedSchemes", "");
11181118
allowedSchemes = allowed.split(",");

0 commit comments

Comments
 (0)