CB-14048: (android) allowedSchemes check empty string fix
This commit is contained in:
parent
5581957078
commit
57eda786e0
@ -1114,9 +1114,11 @@ public class InAppBrowser extends CordovaPlugin {
|
|||||||
// Test for whitelisted custom scheme names like mycoolapp:// or twitteroauthresponse:// (Twitter Oauth Response)
|
// 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]*://.*?$")) {
|
else if (!url.startsWith("http:") && !url.startsWith("https:") && url.matches("^[a-z]*://.*?$")) {
|
||||||
if (allowedSchemes == null) {
|
if (allowedSchemes == null) {
|
||||||
String allowed = preferences.getString("AllowedSchemes", "");
|
String allowed = preferences.getString("AllowedSchemes", null);
|
||||||
|
if(allowed != null) {
|
||||||
allowedSchemes = allowed.split(",");
|
allowedSchemes = allowed.split(",");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (allowedSchemes != null) {
|
if (allowedSchemes != null) {
|
||||||
for (String scheme : allowedSchemes) {
|
for (String scheme : allowedSchemes) {
|
||||||
if (url.startsWith(scheme)) {
|
if (url.startsWith(scheme)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user