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.
This commit is contained in:
parent
019ec3963f
commit
4c4bee528e
@ -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(",");
|
||||
|
Loading…
Reference in New Issue
Block a user